Eclipse Cyclone DDS C++ API Reference

class AlreadyClosedError : public dds::core::Exception, public logic_error
#include <Exception.hpp>

Exception: The object target of this operation has already been closed.

class dds::core::xtypes::Annotation : public dds::core::Reference

Subclassed by dds::core::xtypes::BitBoundAnnotation, dds::core::xtypes::BitsetAnnotation, dds::core::xtypes::ExtensibilityAnnotation, dds::core::xtypes::IdAnnotation, dds::core::xtypes::KeyAnnotation, dds::core::xtypes::MustUnderstandAnnotation, dds::core::xtypes::NestedAnnotation, dds::core::xtypes::SharedAnnotation, dds::core::xtypes::VerbatimAnnotation

Public Functions

Annotation()
TypeKind kind() const

Protected Functions

Annotation(const TypeKind &kind)
class Annotation

Subclassed by dds::core::xtypes::detail::BitBoundAnnotation, dds::core::xtypes::detail::BitsetAnnotation, dds::core::xtypes::detail::ExtensibilityAnnotation, dds::core::xtypes::detail::IdAnnotation, dds::core::xtypes::detail::KeyAnnotation, dds::core::xtypes::detail::MustUnderstandAnnotation, dds::core::xtypes::detail::NestedAnnotation, dds::core::xtypes::detail::SharedAnnotation, dds::core::xtypes::detail::VerbatimAnnotation

struct dds::core::xtypes::AnnotationKind

Public Types

enum type

Values:

enumerator ID_ANNOTATION_TYPE
enumerator OPTIONAL_ANNOTATION_TYPE
enumerator KEY_ANNOTATION_TYPE
enumerator SHARED_ANNOTATION_TYPE
enumerator NESTED_ANNOTATION_TYPE
enumerator EXTENSIBILITY_ANNOTATION_TYPE
enumerator MUST_UNDERSTAND_ANNOTATION_TYPE
enumerator VERBATIM_ANNOTATION_TYPE
enumerator BITSET_ANNOTATION_TYPE
class dds::sub::AnyDataReader : public dds::core::Entity
#include <AnyDataReader.hpp>

Typeless base class for the typed DataReader.

DataReaders are created type specific (fi DataReader<Foo::Bar> reader). However, there are many places in the API (and possibly application) where the type can not be known while still some DataReader

has to be passed around, stored or even typeless functionality called.

Main examples in the API that need typeless

DataReader are: Subscriber, SubscriberListener and DomainParticipantListener.

See

dds::sub::DataReader

Public Functions

template<typename H__>
inline AnyDataReader(const H__ &h)
template<typename T__>
inline AnyDataReader &operator=(const T__ &rhs)
const dds::sub::Subscriber &subscriber() const

Get the Subscriber that owns this DataReader.

Throws
Returns

the Subscriber

const dds::topic::TopicDescription &topic_description() const

Get the TopicDescription associated with this DataReader.

Throws
Returns

the TopicDescription

void wait_for_historical_data(const dds::core::Duration &timeout)

This operation will block the application thread until all “historical” data is received.

This operation behaves differently for DataReader objects which have a non-VOLATILE dds::core::policy::Durability QosPolicy and for DataReader objects which have a VOLATILE dds::core::policy::Durability QosPolicy.

As soon as an application enables a non-VOLATILE DataReader it will start receiving both “historical” data, i.e. the data that was written prior to the time the DataReader joined the domain, as well as any new data written by the DataWriter objects. There are situations where the application logic may require the application to wait until all “historical” data is received. This is the purpose of the wait_for_historical_data operation.

As soon as an application enables a VOLATILE DataReader it will not start receiving “historical” data but only new data written by the DataWriter objects. By calling wait_for_historical_data the DataReader explicitly requests the Data Distribution Service to start receiving also the “historical” data and to wait until either all “historical” data is received, or the duration specified by the max_wait parameter has elapsed, whichever happens first.

Thread Blocking The operation wait_for_historical_data blocks the calling thread until either all “historical” data is received, or the duration specified by the max_wait parameter elapses, whichever happens first. When the function returns normally, indicates that all the “historical” data was received. If the function throws TimeoutError, it indicates that max_wait elapsed before all the data was received.

Parameters

timeout – the time to wait for historical data (can be dds::core::Duration::infinite())

Throws
dds::sub::qos::DataReaderQos qos() const

Gets the DataReaderQos setting for this instance.

Throws
Returns

the qos

void qos(const dds::sub::qos::DataReaderQos &qos)

This operation replaces the existing set of QosPolicy settings for a DataReader.

The parameter qos contains the object with the QosPolicy settings which is checked for self-consistency and mutability.

When the application tries to change a QosPolicy setting for an enabled DataReader, which can only be set before the DataReader is enabled, the operation will fail and a ImmutablePolicyError is thrown. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed.

When the qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicyError is thrown.

Parameters

qos – the qos

Throws
AnyDataReader &operator<<(const dds::sub::qos::DataReaderQos &qos)

This operation replaces the existing set of QosPolicy settings for a DataReader.

The parameter qos contains the object with the QosPolicy settings which is checked for self-consistency and mutability.

When the application tries to change a QosPolicy setting for an enabled DataReader, which can only be set before the DataReader is enabled, the operation will fail and a ImmutablePolicyError is thrown. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed.

When the qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicyError is thrown.

Parameters

qos – the qos

Throws
const AnyDataReader &operator>>(dds::sub::qos::DataReaderQos &qos) const

Gets the DataReaderQos setting for this instance.

Throws
Returns

the qos

dds::core::status::LivelinessChangedStatus liveliness_changed_status()

This operation obtains the LivelinessChangedStatus object of the DataReader.

This object contains the information whether the liveliness of one or more DataWriter objects that were writing instances read by the DataReader has changed. In other words, some DataWriter have become “alive” or “not alive”.

The LivelinessChangedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Throws
Returns

the LivelinessChangedStatus

dds::core::status::SampleRejectedStatus sample_rejected_status()

This operation obtains the SampleRejectedStatus object of the DataReader.

This object contains the information whether a received sample has been rejected. Samples may be rejected by the DataReader when it runs out of resource_limits to store incoming samples. Usually this means that old samples need to be “onsumed” (for example by “taking” them instead of “reading” them) to make room for newly incoming samples.

The SampleRejectedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Throws
Returns

the SampleRejectedStatus

dds::core::status::SampleLostStatus sample_lost_status()

This operation obtains the SampleLostStatus object of the DataReader.

This object contains information whether samples have been lost. This only applies when the dds::core::policy::Reliability QosPolicy is set to RELIABLE. If the ReliabilityQos Policy is set to BEST_EFFORT, the Data Distribution Service will not report the loss of samples.

The SampleLostStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Throws
Returns

the SampleLostStatus

dds::core::status::RequestedDeadlineMissedStatus requested_deadline_missed_status()

This operation obtains the RequestedDeadlineMissedStatus object of the DataReader.

This object contains the information whether the deadline that the DataReader was expecting through its dds::core::policy::Deadline QosPolicy was not respected for a specific instance.

The RequestedDeadlineMissedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Throws
Returns

the RequestedDeadlineMissedStatus

dds::core::status::RequestedIncompatibleQosStatus requested_incompatible_qos_status()

This operation obtains the RequestedIncompatibleQosStatus object of the DataReader.

This object contains the information whether a QosPolicy setting was incompatible with the offered QosPolicy setting.

The Request/Offering mechanism is applicable between the DataWriter and the DataReader. If the QosPolicy settings between DataWriter and DataReader are inconsistent, no communication between them is established. In addition the DataWriter will be informed via a REQUESTED_INCOMPATIBLE_QOS status change and the DataReader will be informed via an OFFERED_INCOMPATIBLE_QOS status change.

The RequestedIncompatibleQosStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Throws
Returns

the RequestedIncompatibleQosStatus

dds::core::status::SubscriptionMatchedStatus subscription_matched_status()

This operation obtains the SubscriptionMatchedStatus object of the DataReader.

This object contains the information whether a new match has been discovered for the current subscription, or whether an existing match has ceased to exist.

This means that the status represents that either a DataWriter object has been discovered by the DataReader with the same Topic and a compatible Qos, or that a previously discovered DataWriter has ceased to be matched to the current DataReader. A DataWriter may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current DataReader or when either the DataReader or the DataWriter has chosen to put its matching counterpart on its ignore-list using the dds::sub::ignore or dds::pub::ignore operations on the DomainParticipant.

The operation may fail if the infrastructure does not hold the information necessary to fill in the SubscriptionMatchedStatus. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In this case the operation will throw UnsupportedError.

The SubscriptionMatchedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.

Throws
Returns

the SubscriptionMatchedStatus

class org::eclipse::cyclonedds::sub::AnyDataReaderDelegate : public org::eclipse::cyclonedds::core::EntityDelegate

Subclassed by dds::sub::detail::DataReader< T >

Public Types

typedef ::dds::core::smart_ptr_traits<AnyDataReaderDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<AnyDataReaderDelegate>::weak_ref_type weak_ref_type

Public Functions

AnyDataReaderDelegate(const dds::sub::qos::DataReaderQos &qos, const dds::topic::TopicDescription &td)
virtual ~AnyDataReaderDelegate()
dds::sub::qos::DataReaderQos qos() const
void qos(const dds::sub::qos::DataReaderQos &qos)
virtual const dds::sub::Subscriber<org::eclipse::cyclonedds::sub::SubscriberDelegate> &subscriber() const = 0
const dds::topic::TopicDescription &topic_description() const
void wait_for_historical_data(const dds::core::Duration &timeout)
dds::core::status::LivelinessChangedStatus liveliness_changed_status()
dds::core::status::SampleRejectedStatus sample_rejected_status()
dds::core::status::SampleLostStatus sample_lost_status()
dds::core::status::RequestedDeadlineMissedStatus requested_deadline_missed_status()
dds::core::status::RequestedIncompatibleQosStatus requested_incompatible_qos_status()
dds::core::status::SubscriptionMatchedStatus subscription_matched_status()
::dds::core::InstanceHandleSeq matched_publications()
template<typename FwdIterator>
inline uint32_t matched_publications(FwdIterator begin, uint32_t max_size)
const dds::topic::PublicationBuiltinTopicData matched_publication_data(const ::dds::core::InstanceHandle &h)
dds::sub::AnyDataReader<AnyDataReaderDelegate> wrapper_to_any()
void reset_data_available()
void add_query(org::eclipse::cyclonedds::sub::QueryDelegate &query)
void remove_query(org::eclipse::cyclonedds::sub::QueryDelegate &query)
void setSample(void *sample)
void *getSample() const
bool is_loan_supported(const dds_entity_t reader) const
void read_cdr(const dds_entity_t reader, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void take_cdr(const dds_entity_t reader, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void loaned_read(const dds_entity_t reader, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void loaned_take(const dds_entity_t reader, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void loaned_read_instance(const dds_entity_t reader, const dds::core::InstanceHandle &handle, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void loaned_take_instance(const dds_entity_t reader, const dds::core::InstanceHandle &handle, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void loaned_read_next_instance(const dds_entity_t reader, const dds::core::InstanceHandle &handle, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void loaned_take_next_instance(const dds_entity_t reader, const dds::core::InstanceHandle &handle, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void read(const dds_entity_t reader, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void take(const dds_entity_t reader, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void read_instance(const dds_entity_t reader, const dds::core::InstanceHandle &handle, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void take_instance(const dds_entity_t reader, const dds::core::InstanceHandle &handle, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void read_next_instance(const dds_entity_t reader, const dds::core::InstanceHandle &handle, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void take_next_instance(const dds_entity_t reader, const dds::core::InstanceHandle &handle, const dds::sub::status::DataState &mask, dds::sub::detail::SamplesHolder &samples, uint32_t max_samples)
void get_key_value(const dds_entity_t reader, const dds::core::InstanceHandle &handle, void *key)
dds_instance_handle_t lookup_instance(const dds_entity_t reader, const void *key) const
virtual void close()

Public Static Functions

static void copy_sample_infos(const dds_sample_info_t &from, dds::sub::SampleInfo &to)
static uint32_t get_ddsc_state_mask(const dds::sub::status::DataState &state)

Protected Attributes

org::eclipse::cyclonedds::core::ObjectSet queries
dds::sub::qos::DataReaderQos qos_
dds::topic::TopicDescription td_
void *sample_

Private Functions

bool init_samples_buffers(const uint32_t requested_max_samples, uint32_t &samples_to_read_cnt, size_t &c_sample_pointers_size, dds::sub::detail::SamplesHolder &samples, void **&c_sample_pointers, dds_sample_info_t *&c_sample_infos)
void fini_samples_buffers(void **&c_sample_pointers, dds_sample_info_t *&c_sample_infos)
class dds::sub::AnyDataReaderListener
#include <AnyDataReaderListener.hpp>

AnyDataReader events Listener.

Because Subscriber and DomainParticipant do not have knowledge of data types, they have to use non-data-type-listeners. In other words Any* listeners.

See

dds::sub::SubscriberListener

See

dds::domain::DomainParticipantListener

Subclassed by dds::sub::NoOpAnyDataReaderListener, dds::sub::SubscriberListener

Public Functions

virtual void on_requested_deadline_missed(AnyDataReader &reader, const dds::core::status::RequestedDeadlineMissedStatus &status) = 0

This operation called by the Data Distribution Service when the deadline that the DataReader was expecting through its DeadlineQosPolicy was not respected for a specific instance.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::requested_deadline_missed().

Parameters
  • reader – contain a pointer to the DataReader for which the deadline was missed (this is an input to the application provided by the Data Distribution Service).

  • status – contain the RequestedDeadlineMissedStatus object (this is an input to the application provided by the Data Distribution Service).

virtual void on_requested_incompatible_qos(AnyDataReader &reader, const dds::core::status::RequestedIncompatibleQosStatus &status) = 0

This operation is called by the Data Distribution Service when the RequestedIncompatibleQosStatus changes.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::requested_incompatible_qos().

The Data Distribution Service will provide a reference to the DataReader in the parameter reader and the RequestedIncompatibleQosStatus object in the parameter status, for use by the application.

When the DataReaderListener on the DataReader is not enabled with the StatusMask::requested_incompatible_qos(), the RequestedIncompatibleQosStatus change will propagate to the SubscriberListener of the Subscriber (if enabled) or to the DomainParticipantListener of the DomainParticipant (if enabled).

Parameters
  • reader – the DataReader provided by the Data Distribution Service.

  • status – the RequestedIncompatibleQosStatus object provided by the Data Distribution Service.

virtual void on_sample_rejected(AnyDataReader &reader, const dds::core::status::SampleRejectedStatus &status) = 0

This operation called by the Data Distribution Service when a (received) sample has been rejected.

Samples may be rejected by the DataReader when it runs out of resource_limits to store incoming samples. Usually this means that old samples need to be ‘consumed’ (for example by ‘taking’ them instead of ‘reading’ them) to make room for newly incoming samples.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled with the StatusMask::sample_lost().

Parameters
  • reader – contains a pointer to the DataReader for which a sample has been rejected (this is an input to the application provided by the Data Distribution Service).

  • status – contains the SampleRejectedStatus object (this is an input to the application provided by the Data Distribution Service).

virtual void on_liveliness_changed(AnyDataReader &reader, const dds::core::status::LivelinessChangedStatus &status) = 0

This operation is called by the Data Distribution Service when the liveliness of one or more DataWriter objects that were writing instances read through this DataReader has changed.

In other words, some DataWriter have become “alive” or “not alive”. The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::liveliness_changed().

Parameters
  • reader – contain a pointer to the DataReader for which the liveliness of one or more DataWriter objects has changed (this is an input to the application provided by the Data Distribution Service).

  • status – contain the LivelinessChangedStatus object (this is an input to the application provided by the Data Distribution Service).

virtual void on_data_available(AnyDataReader &reader) = 0

This operation is called by the Data Distribution Service when new data is available for this DataReader.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::data_available().

The Data Distribution Service will provide a reference to the DataReader in the parameter reader for use by the application.

The statuses StatusMask::data_on_readers() and StatusMask::data_available() will occur together. In case these status changes occur, the Data Distribution Service will look for an attached and activated SubscriberListener or DomainParticipantListener (in that order) for the enabled StatusMask::data_on_readers(). In case the StatusMask::data_on_readers() can not be handled, the Data Distribution Service will look for an attached and activated DataReaderListener, SubscriberListener or DomainParticipantListener for the enabled StatusMask::data_available() (in that order).

Note that if on_data_on_readers is called, then the Data Distribution Service will not try to call on_data_available, however, the application can force a call to the DataReader objects that have data by means of the Subscriber::notify_datareaders() operation.

Parameters

reader – contain a pointer to the DataReader for which data is available (this is an input to the application provided by the Data Distribution Service).

virtual void on_subscription_matched(AnyDataReader &reader, const dds::core::status::SubscriptionMatchedStatus &status) = 0

This operation is called by the Data Distribution Service when a new match has been discovered for the current subscription, or when an existing match has ceased to exist.

Usually this means that a new DataWriter that matches the Topic and that has compatible Qos as the current DataReader has either been discovered, or that a previously discovered DataWriter has ceased to be matched to the current DataReader. A DataWriter may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current DataReader or when either the DataReader or the DataWriter has chosen to put its matching counterpart on its ignore-list using the dds::sub::ignore or dds::pub::ignore operations.

The implementation of this Listener operation may be left empty when this functionality is not needed: it will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::subscription_matched().

Parameters
  • reader – contains a pointer to the DataReader for which a match has been discovered (this is an input to the application provided by the Data Distribution Service).

  • status – contains the SubscriptionMatchedStatus object (this is an input to the application provided by the Data Distribution Service).

virtual void on_sample_lost(AnyDataReader &reader, const dds::core::status::SampleLostStatus &status) = 0

Parameters
  • reader – the DataReader the Listener is applied to

  • status – the SampleLostStatus status

class dds::pub::AnyDataWriter : public dds::core::Entity
#include <AnyDataWriter.hpp>

Typeless base class for the typed DataWriter.

DataWriters are created type specific (fi DataWriter<Foo::Bar> writer). However, there are many places in the API (and possibly application) where the type can not be known while still some DataWriter

has to be passed around, stored or even typeless functionality called.

Main examples in the API that need typeless

DataWriter are: Publisher, PublisherListener and DomainParticipantListener.

Subclassed by dds::pub::DataWriter< T >

Public Functions

const dds::pub::Publisher &publisher() const

Get the Publisher that owns this DataWriter.

Throws
Returns

the Publisher

const dds::topic::TopicDescription &topic_description() const

Get the TopicDescription associated with this DataWriter.

Throws
Returns

the TopicDescription

dds::pub::qos::DataWriterQos qos() const

Gets the DataWriterQos setting for this instance.

Throws
Returns

the qos

void qos(const dds::pub::qos::DataWriterQos &qos)

This operation replaces the existing set of QosPolicy settings for a DataWriter.

The parameter qos contains the object with the QosPolicy settings which is checked for self-consistency and mutability.

When the application tries to change a QosPolicy setting for an enabled DataWriter, which can only be set before the DataWriter is enabled, the operation will fail and a ImmutablePolicyError is thrown. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed.

When the qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicyError is thrown.

Parameters

qos – the qos

Throws
AnyDataWriter &operator<<(const dds::pub::qos::DataWriterQos &qos)

This operation replaces the existing set of QosPolicy settings for a DataWriter.

The parameter qos contains the object with the QosPolicy settings which is checked for self-consistency and mutability.

When the application tries to change a QosPolicy setting for an enabled DataWriter, which can only be set before the DataWriter is enabled, the operation will fail and a ImmutablePolicyError is thrown. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed.

When the qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicyError is thrown.

Parameters

qos – the qos

Throws
const AnyDataWriter &operator>>(dds::pub::qos::DataWriterQos &qos) const

Gets the DataWriterQos setting for this instance.

Throws
Returns

the qos

void wait_for_acknowledgments(const dds::core::Duration &timeout)

This operation blocks the calling thread until either all data written by the DataWriter is acknowledged by the local infrastructure, or until the duration specified by the timeout parameter elapses, whichever happens first.

Data is acknowledged by the local infrastructure when it does not need to be stored in its DataWriter’s local history. When a locally-connected subscription (including the networking service) has no more resources to store incoming samples it will start to reject these samples, resulting in their source DataWriters to store them temporarily in their own local history to be retransmitted at a later moment in time.

In such scenarios, the wait_for_acknowledgments operation will block until the

DataWriter has retransmitted its entire history, which is therefore effectively empty, or until the timeout expires, whichever happens first. In the latter case, this operation will throw a TimeoutError.

Be aware that in case the operation returns normally, the data has only been acknowledged by the local infrastructure: it does not mean all remote subscriptions have already received the data. However, delivering the data to remote nodes is then the sole responsibility of the networking service: even when the publishing application would terminate, all data that has not yet been received may be considered ‘on-route’ and will therefore eventually arrive (unless the networking service itself will crash). In contrast, if a DataWriter would still have data in it’s local history buffer when it terminates, this data is considered ‘lost’.

This operation is intended to be used only if one or more of the contained DataWriters has its ReliabilityQosPolicyKind set to RELIABLE. Otherwise the operation will return immediately, since best-effort DataWriters will never store rejected samples in their local history: they will just drop them and continue business as usual.

Parameters

timeout – the time out duration

Throws
const dds::core::status::LivelinessLostStatus liveliness_lost_status()

This operation obtains the LivelinessLostStatus object of the DataWriter.

The LivelinessLostStatus contains the information whether the liveliness (that the DataWriter has committed through its Liveliness QosPolicy) was respected. This means that the status represents whether the DataWriter failed to actively signal its liveliness within the offered liveliness period. If the liveliness is lost, the DataReader objects will consider the DataWriter as no longer “alive”.

The LivelinessLostStatus can also be monitored using a DataWriterListener or by using the associated StatusCondition.

Throws
Returns

the LivelinessLostStatus

const dds::core::status::OfferedDeadlineMissedStatus offered_deadline_missed_status()

This operation obtains the OfferedDeadlineMissedStatus object of the DataWriter.

The OfferedDeadlineMissedStatus contains the information whether the deadline (that the DataWriter has committed through its Deadline QosPolicy) was respected for each instance.

The OfferedDeadlineMissedStatus can also be monitored using a DataWriterListener or by using the associated StatusCondition.

Throws
Returns

the OfferedDeadlineMissedStatus

const dds::core::status::OfferedIncompatibleQosStatus offered_incompatible_qos_status()

This operation obtains the OfferedIncompatibleQosStatus object of the DataWriter.

The OfferedIncompatibleQosStatus contains the information whether a QosPolicy setting was incompatible with the requested QosPolicy setting.

This means that the status represents whether a DataReader object has been discovered by the DataWriter with the same Topic and a requested DataReaderQos that was incompatible with the one offered by the DataWriter.

The OfferedIncompatibleQosStatus can also be monitored using a DataWriterListener or by using the associated StatusCondition.

Throws
Returns

the OfferedIncompatibleQosStatus

const dds::core::status::PublicationMatchedStatus publication_matched_status()

This operation obtains the PublicationMatchedStatus object of the DataWriter.

The PublicationMatchedStatus contains the information whether a new match has been discovered for the current publication, or whether an existing match has ceased to exist.

This means that the status represents that either a DataReader object has been discovered by the DataWriter with the same Topic and a compatible Qos, or that a previously discovered DataReader has ceased to be matched to the current DataWriter. A DataReader may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current DataWriter or when either the DataWriter or the DataReader has chosen to put its matching counterpart on its ignore-list using the dds::sub::ignore or dds::pub::ignore operations.

The operation may fail if the infrastructure does not hold the information necessary to fill in the PublicationMatchedStatus. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In this case the operation will throw UnsupportedError.

The PublicationMatchedStatus can also be monitored using a DataWriterListener or by using the associated StatusCondition.

Throws
Returns

the PublicationMatchedStatus

void assert_liveliness()

This operation asserts the liveliness for the DataWriter.

This operation will manually assert the liveliness for the DataWriter. This way, the Data Distribution Service is informed that the corresponding DataWriter is still alive. This operation is used in combination with the Liveliness QosPolicy set to Liveliness::ManualByParticipant or Liveliness::ManualByTopic.

Writing data via the write operation of a DataWriter will assert the liveliness on the DataWriter itself and its containing DomainParticipant. Therefore, assert_liveliness is only needed when not writing regularly.

The liveliness should be asserted by the application, depending on the LivelinessQosPolicy. Asserting the liveliness for this DataWriter can also be achieved by asserting the liveliness to the DomainParticipant.

Throws
class org::eclipse::cyclonedds::pub::AnyDataWriterDelegate : public org::eclipse::cyclonedds::core::EntityDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<AnyDataWriterDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<AnyDataWriterDelegate>::weak_ref_type weak_ref_type

Public Functions

virtual ~AnyDataWriterDelegate()
virtual void close()
dds::pub::qos::DataWriterQos qos() const
void qos(const dds::pub::qos::DataWriterQos &qos)
virtual const dds::pub::Publisher<org::eclipse::cyclonedds::pub::PublisherDelegate> &publisher() const = 0
const dds::topic::TopicDescription &topic_description() const
void wait_for_acknowledgments(const dds::core::Duration &timeout)
const ::dds::core::status::LivelinessLostStatus liveliness_lost_status()
const ::dds::core::status::OfferedDeadlineMissedStatus offered_deadline_missed_status()
const ::dds::core::status::OfferedIncompatibleQosStatus offered_incompatible_qos_status()
const ::dds::core::status::PublicationMatchedStatus publication_matched_status()
::dds::core::InstanceHandleSeq matched_subscriptions()
template<typename FwdIterator>
inline uint32_t matched_subscriptions(FwdIterator begin, uint32_t max_size)
const dds::topic::SubscriptionBuiltinTopicData matched_subscription_data(const ::dds::core::InstanceHandle &h)
void assert_liveliness()
dds::pub::AnyDataWriter<AnyDataWriterDelegate> wrapper_to_any()
void write_flush()
void set_batch(bool)

Protected Functions

AnyDataWriterDelegate(const dds::pub::qos::DataWriterQos &qos, const dds::topic::TopicDescription &td)
void write_cdr(dds_entity_t writer, const org::eclipse::cyclonedds::topic::CDRBlob *data, const dds::core::InstanceHandle &handle, const dds::core::Time &timestamp)
void dispose_cdr(dds_entity_t writer, const org::eclipse::cyclonedds::topic::CDRBlob *data, const dds::core::InstanceHandle &handle, const dds::core::Time &timestamp)
void unregister_instance_cdr(dds_entity_t writer, const org::eclipse::cyclonedds::topic::CDRBlob *data, const dds::core::InstanceHandle &handle, const dds::core::Time &timestamp)
bool is_loan_supported(const dds_entity_t writer)
void loan_sample(dds_entity_t writer, void **sample)
void return_loan(dds_entity_t writer, void *sample)
void write(dds_entity_t writer, const void *data, const dds::core::InstanceHandle &handle, const dds::core::Time &timestamp)
void writedispose(dds_entity_t writer, const void *data, const dds::core::InstanceHandle &handle, const dds::core::Time &timestamp)
dds_instance_handle_t register_instance(dds_entity_t writer, const void *data, const dds::core::Time &timestamp)
void unregister_instance(dds_entity_t writer, const dds::core::InstanceHandle &handle, const dds::core::Time &timestamp)
void unregister_instance(dds_entity_t writer, const void *data, const dds::core::Time &timestamp)
void dispose_instance(dds_entity_t writer, const dds::core::InstanceHandle &handle, const dds::core::Time &timestamp)
void dispose_instance(dds_entity_t writer, const void *data, const dds::core::Time &timestamp)
void get_key_value(dds_entity_t writer, void *data, const dds::core::InstanceHandle &handle)
dds_instance_handle_t lookup_instance(dds_entity_t writer, const void *data)

Private Functions

void write_cdr(dds_entity_t writer, const org::eclipse::cyclonedds::topic::CDRBlob *data, const dds::core::InstanceHandle &handle, const dds::core::Time &timestamp, uint32_t statusinfo)

Private Members

dds::pub::qos::DataWriterQos qos_
dds::topic::TopicDescription td_
class dds::pub::AnyDataWriterListener
#include <AnyDataWriterListener.hpp>

AnyDataWriter events Listener.

Because Publisher and DomainParticipant do not have knowledge of data types, they have to use non-data-type-listeners. In other words Any* listeners.

See

dds::pub::PublisherListener

See

dds::domain::DomainParticipantListener

Subclassed by dds::pub::NoOpAnyDataWriterListener, dds::pub::PublisherListener

Public Functions

virtual void on_offered_deadline_missed(dds::pub::AnyDataWriter &writer, const ::dds::core::status::OfferedDeadlineMissedStatus &status) = 0

This operation is called by the Data Distribution Service when the OfferedDeadlineMissedStatus changes.

This operation will only be called when the relevant DataWriterListener is installed and enabled for the offered deadline missed status (StatusMask::offered_deadline_missed()). The offered deadline missed status will change when the deadline that the DataWriter has committed through its DeadlineQosPolicy was not respected for a specific instance.

Parameters
  • writer – contain a pointer to the DataWriter on which the OfferedDeadlineMissedStatus has changed (this is an input to the application)

  • status – contain the OfferedDeadlineMissedStatus object (this is an input to the application).

virtual void on_offered_incompatible_qos(dds::pub::AnyDataWriter &writer, const ::dds::core::status::OfferedIncompatibleQosStatus &status) = 0

This operation called by the Data Distribution Service when the OfferedIncompatibleQosStatus changes.

This operation will only be called when the relevant DataWriterListener is installed and enabled for the StatusMask::offered_incompatible_qos(). The incompatible Qos status will change when a DataReader object has been discovered by the DataWriter with the same Topic and a requested DataReaderQos that was incompatible with the one offered by the DataWriter.

Parameters
  • writer – contain a pointer to the DataWriter on which the OfferedIncompatibleQosStatus has changed (this is an input to the application).

  • status – contain the OfferedIncompatibleQosStatus object (this is an input to the application).

virtual void on_liveliness_lost(dds::pub::AnyDataWriter &writer, const ::dds::core::status::LivelinessLostStatus &status) = 0

This operation is called by the Data Distribution Service when the LivelinessLostStatus changes.

This operation will only be called when the relevant DataWriterListener is installed and enabled for the liveliness lost status (StatusMask::liveliness_lost()). The liveliness lost status will change when the liveliness that the DataWriter has committed through its LivelinessQosPolicy was not respected. In other words, the DataWriter failed to actively signal its liveliness within the offered liveliness period. As a result, the DataReader objects will consider the DataWriter as no longer “alive”.

Parameters
  • writer – contains a pointer to the DataWriter on which the LivelinessLostStatus has changed (this is an input to the application).

  • status – contains the LivelinessLostStatus object (this is an input to the application).

virtual void on_publication_matched(dds::pub::AnyDataWriter &writer, const ::dds::core::status::PublicationMatchedStatus &status) = 0

This operation is called by the Data Distribution Service when a new match has been discovered for the current publication, or when an existing match has ceased to exist.

Usually this means that a new DataReader that matches the Topic and that has compatible Qos as the current DataWriter has either been discovered, or that a previously discovered DataReader has ceased to be matched to the current DataWriter. A DataReader may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current DataWriter or when either the DataWriter or the DataReader has chosen to put its matching counterpart on its ignore-list using the dds::sub::ignore or dds::pub::ignore operations.

it will only be called when the relevant DataWriterListener is installed and enabled for the StatusMask::publication_matched().

Parameters
  • writer – contains a pointer to the DataWriter for which a match has been discovered (this is an input to the application provided by the Data Distribution Service).

  • status – contains the PublicationMatchedStatus object (this is an input to the application provided by the Data Distribution Service).

class dds::topic::AnyTopic : public dds::core::Entity, public dds::topic::TopicDescription
#include <AnyTopic.hpp>

Typeless base class for the typed Topic.

Topics are created type specific (fi Topic<Foo::Bar> topic). However, there are a few places in the API (and possibly application) where the type can not be known while still some Topic

has to be passed around, stored or even typeless functionality called.

The main examples in the API that needs typeless

Topic is: DomainParticipantListener.

See

dds::topic::Topic

Public Functions

dds::topic::qos::TopicQos qos() const

Gets the TopicQos setting for this instance.

Throws
Returns

the qos

void qos(const dds::topic::qos::TopicQos &qos)

This operation replaces the existing set of QosPolicy settings for a Topic.

The parameter qos contains the object with the QosPolicy settings which is checked for self-consistency and mutability.

When the application tries to change a QosPolicy setting for an enabled Topic, which can only be set before the Topic is enabled, the operation will fail and a ImmutablePolicyError is thrown. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed.

When the qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicyError is thrown.

Parameters

qos – the qos

Throws
AnyTopic &operator<<(const dds::topic::qos::TopicQos &qos)

This operation replaces the existing set of QosPolicy settings for a Topic.

The parameter qos contains the object with the QosPolicy settings which is checked for self-consistency and mutability.

When the application tries to change a QosPolicy setting for an enabled Topic, which can only be set before the Topic is enabled, the operation will fail and a ImmutablePolicyError is thrown. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed.

When the qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicyError is thrown.

Parameters

qos – the qos

Throws
const AnyTopic &operator>>(dds::topic::qos::TopicQos &qos) const

Gets the TopicQos setting for this instance.

Throws
Returns

the qos

::dds::core::status::InconsistentTopicStatus inconsistent_topic_status() const

This operation obtains the InconsistentTopicStatus object of the Topic.

The InconsistentTopicStatus can also be monitored using a TopicListener or by using the associated StatusCondition.

Throws
Returns

the SampleRejectedStatus

class org::eclipse::cyclonedds::topic::AnyTopicDelegate : public virtual org::eclipse::cyclonedds::core::EntityDelegate, public virtual org::eclipse::cyclonedds::topic::TopicDescriptionDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<AnyTopicDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<AnyTopicDelegate>::weak_ref_type weak_ref_type

Public Functions

AnyTopicDelegate(const dds::topic::qos::TopicQos &qos, const dds::domain::DomainParticipant &dp, const std::string &name, const std::string &type_name, dds_entity_t ddsc_topic)
virtual ~AnyTopicDelegate()
dds::topic::qos::TopicQos qos() const
void qos(const dds::topic::qos::TopicQos &qos)
::dds::core::status::InconsistentTopicStatus inconsistent_topic_status() const
virtual std::string reader_expression() const
TEMP_TYPE reader_parameters() const
dds::topic::AnyTopic<AnyTopicDelegate> wrapper_to_any()
void init(ObjectDelegate::weak_ref_type weak_ref)
inline void listener_notify(ObjectDelegate::ref_type, uint32_t, void*, void*)
void set_sample(void *sample)
void *get_sample()

Public Static Functions

static dds::topic::AnyTopic<AnyTopicDelegate> discover_topic(const dds::domain::DomainParticipant &dp, const std::string &name, const dds::core::Duration &timeout)
static void discover_topics(const dds::domain::DomainParticipant &dp, std::vector<dds::topic::AnyTopic<AnyTopicDelegate>> &topics, uint32_t max_size)

Protected Functions

AnyTopicDelegate(const dds::topic::qos::TopicQos &qos, const dds::domain::DomainParticipant &dp, const std::string &name, const std::string &type_name)

Protected Attributes

dds::topic::qos::TopicQos qos_
void *sample_
class org::eclipse::cyclonedds::topic::AnyTopicListener

Subclassed by org::eclipse::cyclonedds::domain::DomainParticipantListener, org::eclipse::cyclonedds::topic::NoOpAnyTopicListener

Public Functions

inline virtual ~AnyTopicListener()
class dds::topic::AnyTopicListener
#include <AnyTopicListener.hpp>

AnyTopic events Listener.

Because the DomainParticipant does not have knowledge of data types, it has to use non-data-type-listeners. In other words Any* listeners.

This class is used as a base for other listeners and is not used on its own.

See

dds::domain::DomainParticipantListener

Subclassed by dds::domain::DomainParticipantListener, dds::topic::NoOpAnyTopicListener

Public Functions

virtual void on_inconsistent_topic(AnyTopic &topic, const dds::core::status::InconsistentTopicStatus &status) = 0

This operation is called by the Data Distribution Service when the InconsistentTopicStatus changes.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant TopicListener is installed and enabled with the StatusMask::inconsistent_topic(). The InconsistentTopicStatus will change when another Topic exists with the same topic_name but different characteristics.

Parameters
  • topic – contain a pointer to the Topic on which the conflict occurred (this is an input to the application).

  • status – contain the InconsistentTopicStatus object (this is an input to the application).

class org::eclipse::cyclonedds::core::cdr::basic_cdr_stream : public org::eclipse::cyclonedds::core::cdr::cdr_stream
#include <basic_cdr_ser.hpp>

Implementation of the basic cdr stream.

This type of cdr stream has a maximum alignment of 8 bytes.

Public Functions

inline basic_cdr_stream(uint64_t ignore_faults = 0x0)

Constructor.

Basically a pass through for the cdr_stream base class.

Parameters

ignore_faults[in] Bitmask for ignoring faults, can be composed of bit fields from the serialization_status enumerator.

class dds::core::xtypes::BitBoundAnnotation : public dds::core::xtypes::Annotation

Public Functions

BitBoundAnnotation(uint32_t bound)
class BitBoundAnnotation : public dds::core::xtypes::detail::Annotation
class dds::core::xtypes::BitsetAnnotation : public dds::core::xtypes::Annotation

Public Functions

BitsetAnnotation()
class BitsetAnnotation : public dds::core::xtypes::detail::Annotation
class org::eclipse::cyclonedds::sub::BuiltinSubscriberDelegate : public org::eclipse::cyclonedds::sub::SubscriberDelegate

Public Functions

BuiltinSubscriberDelegate(const dds::domain::DomainParticipant &dp, const dds::sub::qos::SubscriberQos &qos)
inline virtual ~BuiltinSubscriberDelegate()
virtual std::vector<AnyDataReaderDelegate::ref_type> find_datareaders(const std::string &topic_name)

Public Static Functions

static SubscriberDelegate::ref_type get_builtin_subscriber(const dds::domain::DomainParticipant &dp)
static AnyDataReaderDelegate::ref_type get_builtin_reader(SubscriberDelegate &subscriber, const std::string &topic_name)

Private Static Attributes

static org::eclipse::cyclonedds::core::Mutex builtinLock
class dds::topic::BuiltinTopicKey : public dds::core::Value
#include <BuiltinTopicKey.hpp>

Global unique identifier of the Topic.

Public Functions

const int32_t *value() const

Gets the BuiltinTopicKey.

Returns

the BuiltinTopicKey

void value(int32_t v[])

Sets the BuiltinTopicKey.

Parameters

v – the value to set

class org::eclipse::cyclonedds::topic::BuiltinTopicKeyDelegate

Public Types

typedef uint32_t VALUE_T

Public Functions

inline BuiltinTopicKeyDelegate()
inline BuiltinTopicKeyDelegate(int32_t v[])
inline const int32_t *value() const
inline void value(int32_t v[])
inline bool operator==(const BuiltinTopicKeyDelegate &other) const

Private Members

int32_t key_[3]
class BytesTopicType
class org::eclipse::cyclonedds::core::cdr::cdr_stream
#include <cdr_stream.hpp>

Base cdr_stream class.

This class implements the base functions which all “real” cdr stream implementations will use.

Subclassed by org::eclipse::cyclonedds::core::cdr::basic_cdr_stream

Public Functions

inline cdr_stream(size_t max_align, uint64_t ignore_faults = 0x0)

Constructor.

Sets the stream endianness to end, and maximum alignment to max_align.

Parameters
  • max_align[in] The maximum size that the stream will align CDR primitives to.

  • ignore_faults[in] Bitmask for ignoring faults, can be composed of bit fields from the serialization_status enumerator.

inline size_t alignment() const

Returns the current stream alignment.

Returns

The current stream alignment.

inline size_t alignment(size_t newalignment)

Sets the new stream alignment.

Also returns the value the alignment has been set to.

Parameters

newalignment[in] The new alignment to set.

Returns

The value the alignment has been set to.

inline size_t position() const

Returns the current cursor offset.

Returns

The current cursor offset.

Returns

SIZE_MAX – In this case, a maximum size calculation was being done, and the maximum size was determined to be unbounded.

inline size_t position(size_t newposition)

Sets the new cursor offset.

Also returs the value the offset has been set to.

Parameters

newposition[in] The new offset to set.

Returns

The value the offset has been set to.

inline size_t incr_position(size_t incr_by)

Cursor move function.

Moves the current position offset by incr_by if it is not at SIZE_MAX. Returns the position value after this operation.

Parameters

incr_by[in] The amount to move the cursor position by.

Returns

The cursor position after this operation.

inline void reset_position()

Resets the current cursor position and alignment to 0.

void set_buffer(void *toset)

Buffer set function.

Sets the buffer pointer to toset. As a side effect, the current position and alignment are reset, since these are not associated with the new buffer.

Parameters

toset[in] The new pointer of the buffer to set.

inline void *get_cursor() const

Gets the current cursor pointer.

If the current position is SIZE_MAX or the buffer pointer is not set, it returns nullptr.

Returns

The current cursor pointer.

Returns

nullptr – If the current buffer is not set, or if the cursor offset is not valid.

size_t align(size_t newalignment, bool add_zeroes)

Aligns the current stream to a new alignment.

Aligns the current stream to newalignment, moves the cursor be at newalignment. Aligns to maximum m_max_alignment (which is stream-type specific). Zeroes the bytes the cursor is moved if add_zeroes is true. Nothing happens if the stream is already aligned to newalignment.

Parameters
  • newalignment[in] The new alignment to align the stream to.

  • add_zeroes[in] Whether the bytes that the cursor moves need to be zeroed.

Returns

The number of bytes that the cursor was moved.

inline uint64_t status() const

Returns the current status of serialization.

Can be a composition of multiple bit fields from serialization_status.

Returns

The – current status of serialization.

inline bool status(serialization_status toadd)

Serialization status update function.

Adds to the current status of serialization and returns whether abort status has been reached.

Parameters

toadd[in] The serialization status error to add.

Returns

  • false – If the serialization status of the stream HAS NOT YET reached one of the serialization errors which it is not set to ignore.

  • true – If the serialization status of the stream HAS reached one of the serialization errors which it is not set to ignore.

inline bool abort_status() const

Returns true when the stream has encountered an error which it is not set to ignore.

All streaming functions should become NOOPs after this status is encountered.

Returns

  • false – If the serialization status of the stream HAS NOT YET reached one of the serialization errors which it is not set to ignore.

  • true – If the serialization status of the stream HAS reached one of the serialization errors which it is not set to ignore.

Protected Attributes

size_t m_position = 0
size_t m_max_alignment
size_t m_current_alignment = 1
char *m_buffer = nullptr
uint64_t m_status = 0
uint64_t m_fault_mask
class org::eclipse::cyclonedds::topic::CDRBlob

Public Functions

CDRBlob() = default
inline explicit CDRBlob(const std::array<char, 4> &encoding, BlobKind kind, const std::vector<uint8_t> &payload)
inline const std::array<char, 4> &encoding() const
inline std::array<char, 4> &encoding()
inline void encoding(const std::array<char, 4> &_val_)
inline void encoding(std::array<char, 4> &&_val_)
inline BlobKind kind() const
inline BlobKind &kind()
inline void kind(BlobKind _val_)
inline const std::vector<uint8_t> &payload() const
inline std::vector<uint8_t> &payload()
inline void payload(const std::vector<uint8_t> &_val_)
inline void payload(std::vector<uint8_t> &&_val_)

Private Members

std::array<char, 4> encoding_ = {}
BlobKind kind_ = BlobKind::Empty
std::vector<uint8_t> payload_
class dds::sub::detail::CDRSamplesHolder : public dds::sub::detail::SamplesHolder

Public Functions

inline CDRSamplesHolder(dds::sub::LoanedSamples<org::eclipse::cyclonedds::topic::CDRBlob> &samples)
inline virtual void set_length(uint32_t len)
inline virtual uint32_t get_length() const
inline virtual SamplesHolder &operator++(int)
inline virtual void *data()
inline virtual detail::SampleInfo &info()
inline virtual void **cpp_sample_pointers(size_t length)
inline virtual dds_sample_info_t *cpp_info_pointers(size_t length)
inline virtual void set_sample_contents(void **c_sample_pointers, dds_sample_info_t *info)
inline virtual void fini_samples_buffers(void **&c_sample_pointers, dds_sample_info_t *&c_sample_infos)

Private Functions

inline void copy_buffer_to_cdr_blob(const uint8_t *buffer, const size_t size, const org::eclipse::cyclonedds::topic::BlobKind data_kind, org::eclipse::cyclonedds::topic::CDRBlob &cdr_blob) const
inline bool update_cdrblob_from_iox_chunk(ddsi_serdata &current_blob, org::eclipse::cyclonedds::topic::CDRBlob &sample_data)

Private Members

dds::sub::LoanedSamples<org::eclipse::cyclonedds::topic::CDRBlob> &samples_
uint32_t index_
class org::eclipse::cyclonedds::topic::CMDataReaderBuiltinTopicData : public dds::core::Value
#include <BuiltinTopic.hpp>

The CMDataReader topic…

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline const dds::topic::BuiltinTopicKey &subscriber_key() const
inline const std::string &name() const
inline const ::dds::core::policy::History &history() const
inline const ::dds::core::policy::ResourceLimits &resource_limits() const
inline const ::dds::core::policy::ReaderDataLifecycle &reader_data_lifecycle() const
class org::eclipse::cyclonedds::topic::CMDataReaderBuiltinTopicDataDelegate

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline void key(const int32_t *key)
inline const dds::topic::BuiltinTopicKey &subscriber_key() const
inline void subscriber_key(const int32_t *key)
inline const std::string &name() const
inline void name(const char *name)
inline const ::dds::core::policy::History &history() const
inline void history(const dds_qos_t *policy)
inline const ::dds::core::policy::ResourceLimits &resource_limits() const
inline void resource_limits(const dds_qos_t *policy)
inline const ::dds::core::policy::ReaderDataLifecycle &reader_data_lifecycle() const
inline void reader_data_lifecycle(const dds_qos_t *policy)
inline bool operator==(const CMDataReaderBuiltinTopicDataDelegate &other) const

Protected Attributes

dds::topic::BuiltinTopicKey key_
dds::topic::BuiltinTopicKey subscriber_key_
std::string name_
::dds::core::policy::History history_
::dds::core::policy::ResourceLimits resource_limits_
::dds::core::policy::ReaderDataLifecycle reader_data_lifecycle_
class org::eclipse::cyclonedds::topic::CMDataWriterBuiltinTopicData : public dds::core::Value
#include <BuiltinTopic.hpp>

The CMDataWriter topic…

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline const dds::topic::BuiltinTopicKey &publisher_key() const
inline const std::string &name() const
inline const ::dds::core::policy::History &history() const
inline const ::dds::core::policy::ResourceLimits &resource_limits() const
inline const ::dds::core::policy::WriterDataLifecycle &writer_data_lifecycle() const
class org::eclipse::cyclonedds::topic::CMDataWriterBuiltinTopicDataDelegate

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline void key(const dds_qos_t *key)
inline const dds::topic::BuiltinTopicKey &publisher_key() const
inline void publisher_key(const dds_qos_t *key)
inline const std::string &name() const
inline void name(const char *name)
inline const ::dds::core::policy::History &history() const
inline void history(const dds_qos_t *policy)
inline const ::dds::core::policy::ResourceLimits &resource_limits() const
inline void resource_limits(const dds_qos_t *policy)
inline const ::dds::core::policy::WriterDataLifecycle &writer_data_lifecycle() const
inline void writer_data_lifecycle(const dds_qos_t *policy)
inline bool operator==(const CMDataWriterBuiltinTopicDataDelegate &other) const

Protected Attributes

dds::topic::BuiltinTopicKey key_
dds::topic::BuiltinTopicKey publisher_key_
std::string name_
::dds::core::policy::History history_
::dds::core::policy::ResourceLimits resource_limits_
::dds::core::policy::WriterDataLifecycle writer_data_lifecycle_
class org::eclipse::cyclonedds::topic::CMParticipantBuiltinTopicData : public dds::core::Value
#include <BuiltinTopic.hpp>

The CMParticipant topic…

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
class org::eclipse::cyclonedds::topic::CMParticipantBuiltinTopicDataDelegate

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline void key(const int32_t *key)
inline bool operator==(const CMParticipantBuiltinTopicDataDelegate &other) const

Protected Attributes

dds::topic::BuiltinTopicKey key_
class org::eclipse::cyclonedds::topic::CMPublisherBuiltinTopicData : public dds::core::Value
#include <BuiltinTopic.hpp>

The CMPublisher topic…

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline const dds::topic::BuiltinTopicKey &participant_key() const
inline const std::string &name() const
inline const ::dds::core::policy::EntityFactory &entity_factory() const
inline const ::dds::core::policy::Partition &partition() const
class org::eclipse::cyclonedds::topic::CMPublisherBuiltinTopicDataDelegate

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline void key(const int32_t *key)
inline const dds::topic::BuiltinTopicKey &participant_key() const
inline void participant_key(const int32_t *key)
inline const std::string &name() const
inline void name(const char *name)
inline const ::dds::core::policy::EntityFactory &entity_factory() const
inline void entity_factory(const dds_qos_t *policy)
inline const ::dds::core::policy::Partition &partition() const
inline void partition(const dds_qos_t *policy)
inline bool operator==(const CMPublisherBuiltinTopicDataDelegate &other) const

Protected Attributes

dds::topic::BuiltinTopicKey key_
dds::topic::BuiltinTopicKey participant_key_
std::string name_
::dds::core::policy::EntityFactory entity_factory_
::dds::core::policy::Partition partition_
class org::eclipse::cyclonedds::topic::CMSubscriberBuiltinTopicData : public dds::core::Value
#include <BuiltinTopic.hpp>

The CMSubscriber topic…

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline const dds::topic::BuiltinTopicKey &participant_key() const
inline const std::string &name() const
inline const ::dds::core::policy::EntityFactory &entity_factory() const
inline const ::dds::core::policy::Partition &partition() const
class org::eclipse::cyclonedds::topic::CMSubscriberBuiltinTopicDataDelegate

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline void key(const int32_t *key)
inline const dds::topic::BuiltinTopicKey &participant_key() const
inline void participant_key(const int32_t *key)
inline const std::string &name() const
inline void name(const char *name)
inline const ::dds::core::policy::EntityFactory &entity_factory() const
inline void entity_factory(const dds_qos_t *policy)
inline const ::dds::core::policy::Partition &partition() const
inline void partition(const dds_qos_t *policy)
inline bool operator==(const CMSubscriberBuiltinTopicDataDelegate &other) const

Protected Attributes

dds::topic::BuiltinTopicKey key_
dds::topic::BuiltinTopicKey participant_key_
std::string name_
::dds::core::policy::EntityFactory entity_factory_
::dds::core::policy::Partition partition_
class dds::sub::CoherentAccess : public dds::core::Value
#include <CoherentAccess.hpp>

Class for RAII way of beginning/ending coherent access.

Coherent access indicates that the application is about to access the data samples in any of the DataReader objects attached to the Subscriber.

The application is required to use this operation only if Presentation QosPolicy of the Subscriber to which the DataReader belongs has the access_scope set to “GROUP”. In the aforementioned case, the operation must be called prior to calling any of the sample-accessing operations, i.e. read and take on DataReader. Otherwise the sample-accessing operations will throw a PreconditionNotMetError exception.

Once the application has finished accessing the data samples it must end the coherent access. It is not required for the application to begin or end access if the Presentation QosPolicy has the access_scope set to something other than GROUP. Beginning or ending access in this case is not considered an error and has no effect. Beginning and ending access may be nested. In that case, the application end access as many times as it began access.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");

dds::sub::qos::SubscriberQos sQos sQos = participant.default_subscriber_qos()
                                         << dds::core::policy::Presentation::TopicAccessScope(false, true);
dds::sub::Subscriber subscriber(participant, sQos);

{
    std::vector< dds::sub::DataReader<Foo::Bar> > readers;
    // Start coherent access.
    dds::sub::CoherentAccess coherentAccess(subscriber);
    // Find (previously created with the subscriber) datareaders that now got data.
    dds::sub::find< dds::sub::DataReader<Foo::Bar> >(subscriber,
                                                     dds::sub::status::DataState::any(),
                                                     back_inserter(readers));
    // Get data from the readers
    for (size_type i = 0; i < rv.size(); i++) {
        dds::sub::LoanedSamples<Foo::Bar> samples = readers[i].read()
        dds::sub::LoanedSamples<Type1>::const_iterator it;
        for (it = samples.begin(); it != samples.end(); iterator++) {
            const dds::sub::Sample<Foo::Bar>& sample = *it;
            const Foo::Bar& data = sample.data();
            const dds::sub::SampleInfo& info = sample.info();
            // Use sample data and meta information.
        }
    }
}
// CoherentAccess went out of scope: it is ended implicitly

See

for more information: Subscription

See

dds::sub::Subscriber

Public Functions

explicit CoherentAccess(const dds::sub::Subscriber &sub)

Creating a CoherentAccess object, which will begin ‘coherent access’ of received samples using DataReader objects attached to this Subscriber.

Parameters

sub – The Subscriber to begin the coherent access on.

Throws
void end()

This operation will explicitly end the coherent access.

If the Subscriber already ended its coherent access (by a call to this very operation), then a call to this operation will have no effect.

Throws
~CoherentAccess()

The destruction of the CoherentAccess will implicitly end the coherent access if not already ended by a call to end().

When there is a problem with which end() would normally throw an exception, then that exception is swallowed. Errors can be found in the logs.

Private Functions

CoherentAccess(const CoherentAccess&)
CoherentAccess &operator=(const CoherentAccess&)
class org::eclipse::cyclonedds::sub::CoherentAccessDelegate

Public Functions

CoherentAccessDelegate(const dds::sub::Subscriber sub)
~CoherentAccessDelegate()
void end()
bool operator==(const CoherentAccessDelegate &other) const

Private Members

dds::sub::Subscriber sub
bool ended
class dds::pub::CoherentSet : public dds::core::Value
#include <CoherentSet.hpp>

Class for RAII way of beginning/ending coherent publication sets.

A coherent set is a set of modifications that must be propagated in such a way that they are interpreted at the receivers’ side as a consistent set of modifications; that is, the receiver will only be able to access the data after all the modifications in the set are available at the receiver end.

A connectivity change may occur in the middle of a set of coherent changes; for example, the set of partitions used by the Publisher or one of its Subscribers may change, a late-joining DataReader may appear on the network, or a communication failure may occur. In the event that such a change prevents an entity from receiving the entire set of coherent changes, that entity must behave as if it had received none of the set.

The support for coherent changes enables a publishing application to change the value of several data-instances that could belong to the same or different topics and have those changes be seen atomically by the readers. This is useful in cases where the values are inter-related. For example, if there are two data instances representing the altitude and velocity vector of the same aircraft and both are changed, it may be useful to communicate those values in such a way the reader can see both together; otherwise, it may, for example, erroneously interpret that the aircraft is on a collision course.

See

for more information: Publication

See

dds::pub::Publisher

Public Functions

explicit CoherentSet(const dds::pub::Publisher &pub)

Creating a CoherentSet object, which will begin a ‘coherent set’ of modifications using DataWriter objects attached to this Publisher.

A precondition for making coherent changes is that the PresentationQos of the Publisher has its coherent_access attribute set to TRUE. If this is not the case, the Publisher will not accept any coherent start requests and throw dds::core::PreconditionNotMetError.

Parameters

pub – The publisher to supsend publications on.

Throws
void end()

This operation will explicitly end the publication of an coherent set.

If the Publisher already ended its coherent set (by a call to this very operation), then a call to this operation will have no effect.

Throws
~CoherentSet()

The destruction of the CoherentSet will implicitly end the publication of a coheren set if not already ended by a call to end().

When there is a problem with which end() would normally throw an exception, then that exception is swallowed. Errors can be found in the logs.

class org::eclipse::cyclonedds::pub::CoherentSetDelegate

Public Functions

CoherentSetDelegate(const dds::pub::Publisher &pub)
~CoherentSetDelegate()
void end()
bool operator==(const CoherentSetDelegate &other) const

Private Members

dds::pub::Publisher pub
bool ended
class dds::core::xtypes::CollectionType : public DynamicType

Subclassed by dds::core::xtypes::MapType, dds::core::xtypes::SequenceType

Public Functions

uint32_t bounds() const

Public Members

const uint32_t UNBOUNDED = 0xFFFFFFFF

Protected Functions

CollectionType(const std::string &name, TypeKind kind)
class CollectionType
class dds::core::cond::Condition : public virtual dds::core::Reference
#include <Condition.hpp>

This class is the base class for all the conditions that may be attached to a dds::core::cond::WaitSet.

This base class is specialized in three classes by the Data Distribution Service:

Each Condition has a trigger_value that can be TRUE or FALSE and is set by the Data Distribution Service (except a GuardCondition) depending on the evaluation of the Condition.

See

for more information: Status concept

See

for more information: WaitSet concept

Subclassed by dds::core::cond::GuardCondition, dds::core::cond::StatusCondition< T >, dds::sub::cond::ReadCondition

Public Functions

template<typename Functor>
void handler(Functor func)

Registers a functor as custom handler with this Condition.

The supplied functor will be called when this Condition is triggered and either the dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this Condition is attached to.

Parameters

func – The functor to be called when the StatusCondition triggers.

Throws

dds::core::Exception

void reset_handler()

Resets the handler for this Condition.

After the invocation of this function no handler will be registered with this Condition.

Throws

dds::core::Exception

void dispatch()

Dispatches the functor that have been registered with the Condition.

The Condition has to have been triggered for the functor will be called by this function.

Throws

dds::core::Exception

bool trigger_value() const

This operation retrieves the trigger_value of the Condition.

A Condition has a trigger_value that can be TRUE or FALSE and is set by the Data Distribution Service (except a GuardCondition). This operation returns the trigger_value of the Condition.

Throws

dds::core::Exception

Returns

bool The boolean value to which the Condition is set.

template<typename T>
struct is_container<T, std::conditional_t<false, is_container_helper<typename T::value_type, typename T::size_type, typename T::allocator_type, typename T::iterator, typename T::const_iterator, decltype(std::declval<T>().size()), decltype(std::declval<T>().begin()), decltype(std::declval<T>().end()), decltype(std::declval<T>().cbegin()), decltype(std::declval<T>().cend())>, void>> : public true_type
class org::eclipse::cyclonedds::core::cond::ConditionDelegate : public virtual org::eclipse::cyclonedds::core::DDScObjectDelegate

Subclassed by org::eclipse::cyclonedds::core::cond::GuardConditionDelegate, org::eclipse::cyclonedds::core::cond::StatusConditionDelegate, org::eclipse::cyclonedds::sub::cond::ReadConditionDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<ConditionDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<ConditionDelegate>::weak_ref_type weak_ref_type

Public Functions

ConditionDelegate()
~ConditionDelegate()
virtual void init(ObjectDelegate::weak_ref_type weak_ref)
virtual void close()
virtual bool trigger_value() const = 0
template<typename FUN>
inline void set_handler(FUN functor)
void reset_handler()
virtual void dispatch()
dds::core::cond::Condition<ConditionDelegate> wrapper()

Private Members

org::eclipse::cyclonedds::core::cond::FunctorHolderBase *myFunctor
template<typename T>
class ContentFilteredTopic
template<typename T>
class ContentFilteredTopic
class dds::sub::functors::detail::ContentFilterManipulatorFunctor

Public Functions

inline ContentFilterManipulatorFunctor(const dds::sub::Query &q)
template<typename S>
inline void operator()(S &s)

Private Members

const dds::sub::Query query_
template<typename T>
class dds::sub::DataReader
#include <DataReader.hpp>

DataReader allows the applicatin to access published sample data.

A DataReader allows the application:

  • to declare the data it wishes to receive (i.e., make a subscription)

  • to access the data received by the attached Subscriber

A DataReader refers to exactly one TopicDescription (either a Topic, a ContentFilteredTopic or a MultiTopic) that identifies the samples to be read. The Topic must exist prior to the DataReader creation.

A DataReader is attached to exactly one Subscriber which acts as a factory for it.

The DataReader may give access to several instances of the data type, which are distinguished from each other by their key.

The pre-processor generates from IDL type descriptions the application DataReader<type> classes. For each application data type that is used as Topic data type, a typed class DataReader<type> is derived from the AnyDataReader class.

For instance, for an application, the definitions are located in the Foo.idl file. The pre-processor will generate a ccpp_Foo.h include file.

General note: The name ccpp_Foo.h is derived from the IDL file Foo.idl, that defines Foo::Bar, for all relevant DataReader<Foo::Bar> operations.

Example

// Default creation of a DataReader
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

{
    // Default read of a sample on the DataReader
    dds::sub::LoanedSamples<Foo::Bar> samples;
    samples = reader.read();

    // Default way of accessing the loaned samples
    dds::sub::LoanedSamples<Foo::Bar>::const_iterator it;
    for (it = samples.begin(); it != samples.end(); ++it) {
        const dds::sub::Sample<Foo::Bar>& sample = *it;
        const Foo::Bar& data = sample.data();
        const dds::sub::SampleInfo& info = sample.info();
        // Use sample data and meta information.
    }
}
// Like the name says, the read samples are loans from the DataReader. The loan
// was automatically returned when the LoanedSamples went out of scope.

Note

Apart from idl files, Google protocol buffers are also supported. For the API itself, it doesn’t matter if the type header files were generated from idl or protocol buffers. The resulting API usage and includes remain the same.

See

for more information: Subscription concept

See

for more information: DataReader concept

Public Types

typedef ::dds::sub::DataReaderListener<T> Listener

Local convenience typedef for dds::sub::DataReaderListener.

Public Functions

DataReader(const dds::sub::Subscriber &sub, const ::dds::topic::Topic<T> &topic)

Create a new DataReader for the desired Topic, ContentFilteredTopic or MultiTopic, using the given Subscriber.

QoS The DataReader will be created with the QoS values specified on the last successful call to sub.default_datareader_qos(qos) or, if the call was never made, the default values.

Parameters
Throws
DataReader(const dds::sub::Subscriber &sub, const ::dds::topic::Topic<T> &topic, const dds::sub::qos::DataReaderQos &qos, dds::sub::DataReaderListener<T> *listener = NULL, const dds::core::status::StatusMask &mask = ::dds::core::status::StatusMask::none())

Create a new DataReader for the desired Topic, ContentFilteredTopic or MultiTopic, using the given Subscriber and DataReaderQos and attaches the optionally specified DataReaderListener to it.

QoS A possible application pattern to construct the DataReaderQos for the DataReader is to:

// 1) Retrieve the QosPolicy settings on the associated Topic
dds::topic::qos::TopicQos topicQos = topic.qos();
// 2) Retrieve the default DataReaderQos from the related Subscriber
dds::sub::qos::DataReaderQos readerQos = subscriber.default_datareader_qos();
// 3) Combine those two lists of QosPolicy settings by overwriting DataReaderQos
//    policies that are also present TopicQos
readerQos = topicQos;
// 4) Selectively modify QosPolicy settings as desired.
readerQos << dds::core::policy::Durability::Transient();
// 5) Use the resulting QoS to construct the DataReader.
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic, readerQos);

Listener The following statuses are applicable to the DataReaderListener:

See listener concept, communication status and communication propagation for more information.

Parameters
Throws
dds::sub::status::DataState default_filter_state()

Returns the default state filter for read/take operations.

The default value of default_filter_state is dds::sub::status::DataState::any().

Returns

the default state to filter for

DataReader &default_filter_state(const dds::sub::status::DataState &state)

Set the default state filter for read/take operations.

Default State Filter The default_filter_state indicates what the dds::sub::status::DataState of samples should be for the read to filter them out of the total data samples pool.

This filter can be overruled by using dds::sub::DataReader::Selector::state or dds::sub::DataReader::ManipulatorSelector::state during the actual read action.

Parameters

state – the state mask that will be used to read/take samples

DataReader &operator>>(dds::sub::LoanedSamples<T> &ls)

This operation reads a sequence of typed samples from the DataReader by means of the shift operator.

What samples are read depends on what default state filter has been set (default any).

This operation reads a sequence of typed samples from the DataReader<type>. The data is put into a dds::sub::LoanedSamples, which is basically a sequence of samples, which in turn contains the actual data and meta information.

The memory used for storing the sample may be loaned by the middleware thus allowing zero copy operations.

If the DataReader has no samples that meet the constraints, the resulting dds::sub::LoanedSamples will be empty.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

{
    dds::sub::LoanedSamples<Foo::Bar> samples;
    reader >> samples;
}
// The LoanedSamples went out of scope, meaning the loan was returned.

The default behaviour of the DataReader stream operator>> is to read samples. It can be explicitly stated if the operator should do a read or take.

reader >> dds::sub::read >> samples;
reader >> dds::sub::take >> samples;
These are two of the available convenience manipulators (see next paragraph).

Manipulators are defined externally to make it possible to control which data is read and whether the streaming operators reads or takes.

Available convenience stream manipulators:

  • dds::sub::read

  • dds::sub::take

  • dds::sub::max_samples

  • dds::sub::content

  • dds::sub::state

  • dds::sub::instance

  • dds::sub::next_instance

The manipulators can be concatenated:

// Take (iso read) a maximum of 3 new samples of a certain instance.
reader >> dds::sub::take
       >> dds::sub::max_samples(3)
       >> dds::sub::state(dds::sub::status::DataState::new_data())
       >> dds::sub::instance(someValidInstanceHandle)
       >> samples;

Please be aware that using pre-set filters on the DataReader and then call read() or take() on that reader explicitly will perform better than having to create Manipulators for every read (which is what essentially happens in the code example above). Performance can be increase by creating a manipulator up front and using that multiple times (see dds::sub::DataReader::ManipulatorSelector).

Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo indicates whether the corresponding data value contains any meaningful data. If not, the data value is just a ‘dummy’ sample for which only the keyfields have been assigned. It is used to accompany the SampleInfo that communicates a change in the instance_state of an instance for which there is no ‘real’ sample available.

For example, when an application always ‘takes’ all available samples of a particular instance, there is no sample available to report the disposal of that instance. In such a case the DataReader will insert a dummy sample into the data_values sequence to accompany the SampleInfo element in the info_seq sequence that communicates the disposal of the instance.

The act of reading a sample sets its sample_state to READ_SAMPLE_STATE. If the sample belongs to the most recent generation of the instance, it also sets the view_state of the instance to NOT_NEW_VIEW_STATE. It does not affect the instance_state of the instance.

Throws
ManipulatorSelector operator>> (ManipulatorSelector &(manipulator)(ManipulatorSelector &))

This operation reads a sequence of typed samples from the DataReader by means of the shift operator.

What samples are read depends on what default state filter has been set (default any).

This operation reads a sequence of typed samples from the DataReader<type>. The data is put into a dds::sub::LoanedSamples, which is basically a sequence of samples, which in turn contains the actual data and meta information.

The memory used for storing the sample may be loaned by the middleware thus allowing zero copy operations.

If the DataReader has no samples that meet the constraints, the resulting dds::sub::LoanedSamples will be empty.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

{
    dds::sub::LoanedSamples<Foo::Bar> samples;
    reader >> samples;
}
// The LoanedSamples went out of scope, meaning the loan was returned.

The default behaviour of the DataReader stream operator>> is to read samples. It can be explicitly stated if the operator should do a read or take.

reader >> dds::sub::read >> samples;
reader >> dds::sub::take >> samples;
These are two of the available convenience manipulators (see next paragraph).

Manipulators are defined externally to make it possible to control which data is read and whether the streaming operators reads or takes.

Available convenience stream manipulators:

  • dds::sub::read

  • dds::sub::take

  • dds::sub::max_samples

  • dds::sub::content

  • dds::sub::state

  • dds::sub::instance

  • dds::sub::next_instance

The manipulators can be concatenated:

// Take (iso read) a maximum of 3 new samples of a certain instance.
reader >> dds::sub::take
       >> dds::sub::max_samples(3)
       >> dds::sub::state(dds::sub::status::DataState::new_data())
       >> dds::sub::instance(someValidInstanceHandle)
       >> samples;

Please be aware that using pre-set filters on the DataReader and then call read() or take() on that reader explicitly will perform better than having to create Manipulators for every read (which is what essentially happens in the code example above). Performance can be increase by creating a manipulator up front and using that multiple times (see dds::sub::DataReader::ManipulatorSelector).

Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo indicates whether the corresponding data value contains any meaningful data. If not, the data value is just a ‘dummy’ sample for which only the keyfields have been assigned. It is used to accompany the SampleInfo that communicates a change in the instance_state of an instance for which there is no ‘real’ sample available.

For example, when an application always ‘takes’ all available samples of a particular instance, there is no sample available to report the disposal of that instance. In such a case the DataReader will insert a dummy sample into the data_values sequence to accompany the SampleInfo element in the info_seq sequence that communicates the disposal of the instance.

The act of reading a sample sets its sample_state to READ_SAMPLE_STATE. If the sample belongs to the most recent generation of the instance, it also sets the view_state of the instance to NOT_NEW_VIEW_STATE. It does not affect the instance_state of the instance.

Throws
template<typename Functor>
ManipulatorSelector operator>>(Functor f)

This operation reads a sequence of typed samples from the DataReader by means of the shift operator.

What samples are read depends on what default state filter has been set (default any).

This operation reads a sequence of typed samples from the DataReader<type>. The data is put into a dds::sub::LoanedSamples, which is basically a sequence of samples, which in turn contains the actual data and meta information.

The memory used for storing the sample may be loaned by the middleware thus allowing zero copy operations.

If the DataReader has no samples that meet the constraints, the resulting dds::sub::LoanedSamples will be empty.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

{
    dds::sub::LoanedSamples<Foo::Bar> samples;
    reader >> samples;
}
// The LoanedSamples went out of scope, meaning the loan was returned.

The default behaviour of the DataReader stream operator>> is to read samples. It can be explicitly stated if the operator should do a read or take.

reader >> dds::sub::read >> samples;
reader >> dds::sub::take >> samples;
These are two of the available convenience manipulators (see next paragraph).

Manipulators are defined externally to make it possible to control which data is read and whether the streaming operators reads or takes.

Available convenience stream manipulators:

  • dds::sub::read

  • dds::sub::take

  • dds::sub::max_samples

  • dds::sub::content

  • dds::sub::state

  • dds::sub::instance

  • dds::sub::next_instance

The manipulators can be concatenated:

// Take (iso read) a maximum of 3 new samples of a certain instance.
reader >> dds::sub::take
       >> dds::sub::max_samples(3)
       >> dds::sub::state(dds::sub::status::DataState::new_data())
       >> dds::sub::instance(someValidInstanceHandle)
       >> samples;

Please be aware that using pre-set filters on the DataReader and then call read() or take() on that reader explicitly will perform better than having to create Manipulators for every read (which is what essentially happens in the code example above). Performance can be increase by creating a manipulator up front and using that multiple times (see dds::sub::DataReader::ManipulatorSelector).

Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo indicates whether the corresponding data value contains any meaningful data. If not, the data value is just a ‘dummy’ sample for which only the keyfields have been assigned. It is used to accompany the SampleInfo that communicates a change in the instance_state of an instance for which there is no ‘real’ sample available.

For example, when an application always ‘takes’ all available samples of a particular instance, there is no sample available to report the disposal of that instance. In such a case the DataReader will insert a dummy sample into the data_values sequence to accompany the SampleInfo element in the info_seq sequence that communicates the disposal of the instance.

The act of reading a sample sets its sample_state to READ_SAMPLE_STATE. If the sample belongs to the most recent generation of the instance, it also sets the view_state of the instance to NOT_NEW_VIEW_STATE. It does not affect the instance_state of the instance.

Throws
LoanedSamples<T> read()

This operation reads a sequence of typed samples from the DataReader.

What samples are read depends on what default state filter has been set (default any).

This operation reads a sequence of typed samples from the DataReader<type>. The data is put into a dds::sub::LoanedSamples, which is basically a sequence of samples, which in turn contains the actual data and meta information.

The memory used for storing the sample may be loaned by the middleware thus allowing zero copy operations.

If the DataReader has no samples that meet the constraints, the resulting dds::sub::LoanedSamples will be empty.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

{
    // Read the available samples.
    dds::sub::LoanedSamples<Foo::Bar> samples;
    samples = reader.read();

    // Access the information.
    dds::sub::LoanedSamples<Foo::Bar>::const_iterator it;
    for (it = samples.begin(); it != samples.end(); ++it) {
        const dds::sub::Sample<Foo::Bar>& sample = *it;
    }
}
// The LoanedSamples went out of scope, meaning the loan resources were taken care of.

What data is read already depends on the default state filter. But it can be manipulated even more when using dds::sub::DataReader::select() operation.

Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo indicates whether the corresponding data value contains any meaningful data. If not, the data value is just a ‘dummy’ sample for which only the keyfields have been assigned. It is used to accompany the SampleInfo that communicates a change in the instance_state of an instance for which there is no ‘real’ sample available.

For example, when an application always ‘takes’ all available samples of a particular instance, there is no sample available to report the disposal of that instance. In such a case the DataReader will insert a dummy sample into the data_values sequence to accompany the SampleInfo element in the info_seq sequence that communicates the disposal of the instance.

The act of reading a sample sets its sample_state to READ_SAMPLE_STATE. If the sample belongs to the most recent generation of the instance, it also sets the view_state of the instance to NOT_NEW_VIEW_STATE. It does not affect the instance_state of the instance.

Throws
Returns

The samples in the LoanedSamples container

LoanedSamples<T> take()

This operation takes a sequence of typed samples from the DataReader.

The behaviour is identical to read except for that the samples are removed from the DataReader.

What samples are taken depends on what default state filter has been set (default any).

This operation takes a sequence of typed samples from the DataReader<type>. The data is put into a dds::sub::LoanedSamples, which is basically a sequence of samples, which in turn contains the actual data and meta information.

The memory used for storing the sample may be loaned by the middleware thus allowing zero copy operations.

If the DataReader has no samples that meet the constraints, the resulting dds::sub::LoanedSamples will be empty.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

{
    // Take the available samples.
    dds::sub::LoanedSamples<Foo::Bar> samples;
    samples = reader.take();

    // Access the information.
    dds::sub::LoanedSamples<Foo::Bar>::const_iterator it;
    for (it = samples.begin(); it != samples.end(); ++it) {
        const dds::sub::Sample<Foo::Bar>& sample = *it;
    }
}
// The LoanedSamples went out of scope, meaning the loan resources were taken care of.

What data is taken, already depends on the default state filter. But it can be manipulated even more when using dds::sub::DataReader::select() operation.

Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo

indicates whether the corresponding data value contains any meaningful data.

Look

here for more information.

Throws
Returns

The samples in the LoanedSamples container

template<typename SamplesFWIterator>
uint32_t read(SamplesFWIterator sfit, uint32_t max_samples)

This operation reads a sequence of typed samples from the DataReader.

What samples are read depends on what default state filter has been set (default any).

The samples are copied into the application provided container using the forward iterator parameter.

If the DataReader has no samples that meet the constraints, the resulting dds::sub::LoanedSamples will be empty.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

// Prepare container to store samples in
const uint32_t MAX_SAMPLES (3)
std::vector<dds::sub::Sample<Foo::Bar> > samples(MAX_SAMPLES);
std::vector<dds::sub::Sample<Foo::Bar> >::iterator iter = samples.begin();

// Read and copy the available samples into the vector by means of the iterator
uint32_t len =  reader.read(iter, MAX_SAMPLES);

// Access the information.
for (iter = samples.begin(); iter != samples.end(); ++iter) {
    const dds::sub::Sample<Foo::Bar>& sample = *iter;
}

What data is read already depends on the default state filter. But it can be manipulated even more when using dds::sub::DataReader::select() operation.

Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo

indicates whether the corresponding data value contains any meaningful data.

Look

here for more information.

Parameters
  • sfit – Forward-inserting container iterator

  • max_samples – Maximum samples to read and copy into the given container

Throws
Returns

The number of samples in the LoanedSamples container

template<typename SamplesFWIterator>
uint32_t take(SamplesFWIterator sfit, uint32_t max_samples)

This operation takes a sequence of typed samples from the DataReader.

What samples are take depends on what default state filter has been set (default any).

The samples are copied into the application provided container using the forward iterator parameter.

If the DataReader has no samples that meet the constraints, the resulting dds::sub::LoanedSamples will be empty.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

// Prepare container to store samples in
const uint32_t MAX_SAMPLES (3)
std::vector<dds::sub::Sample<Foo::Bar> > samples(MAX_SAMPLES);
std::vector<dds::sub::Sample<Foo::Bar> >::iterator iter = samples.begin();

// Take and copy the available samples into the vector by means of the iterator
uint32_t len =  reader.take(iter, MAX_SAMPLES);

// Access the information.
for (iter = samples.begin(); iter != samples.end(); ++iter) {
    const dds::sub::Sample<Foo::Bar>& sample = *iter;
}

What data is taken, already depends on the default state filter. But it can be manipulated even more when using dds::sub::DataReader::select() operation.

Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo

indicates whether the corresponding data value contains any meaningful data.

Look

here for more information.

Parameters
  • sfit – Forward-inserting container iterator

  • max_samples – Maximum samples to take and copy into the given container

Throws
Returns

The number of samples in the given container

template<typename SamplesBIIterator>
uint32_t read(SamplesBIIterator sbit)

This operation reads a sequence of typed samples from the DataReader.

What samples are read depends on what default state filter has been set (default any).

The samples are copied into the application provided container using a back-inserting iterator. Notice that as a consequence of using a back-inserting iterator, this operation may allocate memory to resize the underlying container.

If the DataReader has no samples that meet the constraints, the resulting dds::sub::LoanedSamples will be empty.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

// Prepare container to store samples in
std::vector<dds::sub::Sample<Foo::Bar> > samples;
std::back_insert_iterator< std::vector<dds::sub::Sample<Foo::Bar> > > bi(samples);

// Read and copy the available samples into the vector by means of the iterator
uint32_t len =  reader.read(bi);

// Access the information.
std::vector<dds::sub::Sample<Space::Type1> >::iterator iter = samples.begin();
for (iter = samples.begin(); iter != samples.end(); ++iter) {
    const dds::sub::Sample<Foo::Bar>& sample = *iter;
}

What data is read already depends on the default state filter. But it can be manipulated even more when using dds::sub::DataReader::select() operation.

Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo

indicates whether the corresponding data value contains any meaningful data.

Look

here for more information.

Parameters

sbit – Back-inserting container iterator

Throws
Returns

The number of samples in the given container

template<typename SamplesBIIterator>
uint32_t take(SamplesBIIterator sbit)

This operation takes a sequence of typed samples from the DataReader.

What samples are take depends on what default state filter has been set (default any).

The samples are copied into the application provided container using a back-inserting iterator. Notice that as a consequence of using a back-inserting iterator, this operation may allocate memory to resize the underlying container.

If the DataReader has no samples that meet the constraints, the resulting dds::sub::LoanedSamples will be empty.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

// Prepare container to store samples in
std::vector<dds::sub::Sample<Foo::Bar> > samples;
std::back_insert_iterator< std::vector<dds::sub::Sample<Foo::Bar> > > bi(samples);

// Take and copy the available samples into the vector by means of the iterator
uint32_t len =  reader.take(bi);

// Access the information.
std::vector<dds::sub::Sample<Space::Type1> >::iterator iter = samples.begin();
for (iter = samples.begin(); iter != samples.end(); ++iter) {
    const dds::sub::Sample<Foo::Bar>& sample = *iter;
}

What data is taken, already depends on the default state filter. But it can be manipulated even more when using dds::sub::DataReader::select() operation.

Some elements in the returned sequence may not have valid data: the valid_data field in the SampleInfo

indicates whether the corresponding data value contains any meaningful data.

Look

here for more information.

Parameters

sbit – Back-inserting container iterator

Throws
Returns

The number of samples in the given container

Selector select()

Get a dds::sub::DataReader::Selector instance that acts on this DataReader.

The DataReader::read and DataReader::take read all samples that are available within the DataReader (provided that the default state filter hasn’t been changed).

A Selector can perform complex data selections, such as per-instance selection, content and status filtering, etc when reading or taking. Such a selector is returned by this operation. Setting filters on the Selector can be concatenated, resulting in the following example code.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

// Take a maximum of 3 new samples of a certain instance.
{
    dds::sub::LoanedSamples<Foo::Bar> samples;
    samples = reader.select()
                        .max_samples(3)
                        .state(dds::sub::status::DataState::new_data())
                        .instance(someValidInstanceHandle)
                        .take();
}

Please be aware that using pre-set filters on the DataReader and then call read() or take() on that reader explicitly will perform better than having to create Selectors for every read (which is what essentially happens in the code example above). Performance can be increase by creating a selector up front and using that multiple times (see dds::sub::DataReader::Selector).

Throws
Returns

A Selector that acts on the DataReader

dds::topic::TopicInstance<T> key_value(const dds::core::InstanceHandle &h)

This operation retrieves the key value of a specific instance.

This operation can be used to retrieve the instance key that corresponds to an instance_handle. The operation will only fill the fields that form the key inside the sample instance.

This operation may raise a InvalidArgumentError exception if the InstanceHandle does not correspond to an existing data-object known to the DataReader. If the implementation is not able to check invalid handles, then the result in this situation is unspecified.

Parameters

h – The instance handle

Throws
Returns

A topic instance with the handle and key fields set

T &key_value(T &sample, const dds::core::InstanceHandle &h)

This operation retrieves the key value of a specific instance.

This operation can be used to retrieve the instance key that corresponds to an instance_handle. The operation will only fill the fields that form the key inside the sample instance.

This operation may raise a InvalidArgumentError exception if the InstanceHandle does not correspond to an existing data-object known to the DataReader. If the implementation is not able to check invalid handles, then the result in this situation is unspecified.

The Sample is added as parameter to be able to overload this operation.

Parameters
  • sample[out] A sample to set the key fields of

  • h[in] The instance handle

Throws
Returns

The given sample with the key fields set

const dds::core::InstanceHandle lookup_instance(const T &key) const

This operation returns the value of the instance handle which corresponds to the instance_data.

The instance handle can be used in read operations that operate on a specific instance. Note that DataReader instance handles are local, and are not interchangeable with DataWriter instance handles nor with instance handles of an other DataReader.

This operation does not register the instance in question. If the instance has not been previously registered or if for any other reason the Service is unable to provide an instance handle, the Service will return the default nil handle (InstanceHandle.is_nil() == true).

Parameters

key – the sample

Throws
Returns

the instance handle

void listener(Listener *listener, const dds::core::status::StatusMask &event_mask)

Register a listener with the DataReader.

This operation attaches a DataReaderListener to the DataReader. Only one DataReaderListener can be attached to each DataReader. If a DataReaderListener was already attached, the operation will replace it with the new one. When the listener is the NULL pointer, it represents a listener that is treated as a NOOP for all statuses activated in the bit mask.

Listener un-registration is performed by setting the listener to NULL and mask none().

Communication Status For each communication status, the StatusChangedFlag flag is initially set to FALSE. It becomes TRUE whenever that communication status changes. For each communication status activated in the mask, the associated DataReaderListener operation is invoked and the communication status is reset to FALSE, as the listener implicitly accesses the status which is passed as a parameter to that operation. The status is reset prior to calling the listener, so if the application calls the get_<status_name>_status from inside the listener it will see the status already reset. An exception to this rule is the NULL listener, which does not reset the communication statuses for which it is invoked.

The following statuses are applicable to the DataReaderListener:

Be aware that the SUBSCRIPTION_MATCHED_STATUS is not applicable when the infrastructure does not have the information available to determine connectivity. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In this case the operation will throw UnsupportedError.

Status bits are declared as a constant and can be used by the application in an OR operation to create a tailored mask. The special constant dds::core::status::StatusMask::none() can be used to indicate that the created entity should not respond to any of its available statuses. The DDS will therefore attempt to propagate these statuses to its factory. The special constant dds::core::status::StatusMask::all()

can be used to select all applicable statuses specified in the “Data Distribution Service for Real-time Systems Version

1.2” specification which are applicable to the PublisherListener.

Status Propagation In case a communication status is not activated in the mask of the DataReaderListener, the SubscriberListener of the containing Subscriber is invoked (if attached and activated for the status that occurred). This allows the application to set a default behaviour in the SubscriberListener of the containing Subscriber and a DataReader specific behaviour when needed. In case the communication status is not activated in the mask of the SubscriberListener as well, the communication status will be propagated to the DomainParticipantListener of the containing DomainParticipant. In case the DomainParticipantListener is also not attached or the communication status is not activated in its mask, the application is not notified of the change.

The statuses DATA_ON_READERS_STATUS and DATA_AVAILABLE_STATUS are “Read Communication Statuses” and are an exception to all other plain communication statuses: they have no corresponding status structure that can be obtained with a get_<status_name>_status operation and they are mutually exclusive. When new information becomes available to a DataReader, the Data Distribution Service will first look in an attached and activated SubscriberListener or DomainParticipantListener (in that order) for the DATA_ON_READERS_STATUS. In case the DATA_ON_READERS_STATUS can not be handled, the Data Distribution Service will look in an attached and activated DataReaderListener, SubscriberListener or DomainParticipant Listener for the DATA_AVAILABLE_STATUS (in that order).

See also listener information.

Parameters
  • listener – the listener

  • event_mask – the mask defining the events for which the listener will be notified.

Throws
Listener *listener() const

Get the listener of this DataReader.

See also listener information.

Throws

dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

Returns

the listener

template<typename T>
class dds::sub::detail::DataReader : public org::eclipse::cyclonedds::sub::AnyDataReaderDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<DataReader<T>>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<DataReader<T>>::weak_ref_type weak_ref_type

Public Functions

DataReader(const dds::sub::Subscriber &sub, const dds::topic::Topic<T> &topic, const dds::sub::qos::DataReaderQos &qos, dds::sub::DataReaderListener<T> *listener = NULL, const dds::core::status::StatusMask &mask = ::dds::core::status::StatusMask::none())
DataReader(const dds::sub::Subscriber &sub, const dds::topic::ContentFilteredTopic<T, dds::topic::detail::ContentFilteredTopic> &topic, const dds::sub::qos::DataReaderQos &qos, dds::sub::DataReaderListener<T> *listener = NULL, const dds::core::status::StatusMask &mask = ::dds::core::status::StatusMask::none())
void common_constructor(dds::sub::DataReaderListener<T> *listener, const dds::core::status::StatusMask &mask)
virtual ~DataReader()
void copy_samples(dds::sub::detail::SamplesHolder &samples, void **&c_sample_pointers, dds_sample_info_t *&c_sample_infos, int num_read)
void init(ObjectDelegate::weak_ref_type weak_ref)
dds::sub::status::DataState default_filter_state()
void default_filter_state(const dds::sub::status::DataState &state)
bool is_loan_supported()
dds::sub::LoanedSamples<org::eclipse::cyclonedds::topic::CDRBlob> read_cdr()
dds::sub::LoanedSamples<org::eclipse::cyclonedds::topic::CDRBlob> take_cdr()
dds::sub::LoanedSamples<T> read()
dds::sub::LoanedSamples<T> take()
template<typename SamplesFWIterator>
uint32_t read(SamplesFWIterator samples, uint32_t max_samples)
template<typename SamplesFWIterator>
uint32_t take(SamplesFWIterator samples, uint32_t max_samples)
template<typename SamplesBIIterator>
uint32_t read(SamplesBIIterator samples)
template<typename SamplesBIIterator>
uint32_t take(SamplesBIIterator samples)
dds::topic::TopicInstance<T> key_value(const dds::core::InstanceHandle &h)
T &key_value(T &key, const dds::core::InstanceHandle &h)
const dds::core::InstanceHandle lookup_instance(const T &key) const
virtual const dds::sub::Subscriber &subscriber() const
virtual void close()
dds::sub::DataReaderListener<T> *listener()
void listener(dds::sub::DataReaderListener<T> *l, const dds::core::status::StatusMask &event_mask)
dds::sub::DataReader<T, dds::sub::detail::DataReader> wrapper()
virtual void on_requested_deadline_missed(dds_entity_t, org::eclipse::cyclonedds::core::RequestedDeadlineMissedStatusDelegate&)
virtual void on_requested_incompatible_qos(dds_entity_t, org::eclipse::cyclonedds::core::RequestedIncompatibleQosStatusDelegate&)
virtual void on_sample_rejected(dds_entity_t, org::eclipse::cyclonedds::core::SampleRejectedStatusDelegate&)
virtual void on_liveliness_changed(dds_entity_t, org::eclipse::cyclonedds::core::LivelinessChangedStatusDelegate&)
virtual void on_data_available(dds_entity_t)
virtual void on_subscription_matched(dds_entity_t, org::eclipse::cyclonedds::core::SubscriptionMatchedStatusDelegate&)
virtual void on_sample_lost(dds_entity_t, org::eclipse::cyclonedds::core::SampleLostStatusDelegate&)

Private Types

enum SelectMode

Values:

enumerator SELECT_MODE_READ
enumerator SELECT_MODE_READ_INSTANCE
enumerator SELECT_MODE_READ_NEXT_INSTANCE
enumerator SELECT_MODE_READ_WITH_CONDITION
enumerator SELECT_MODE_READ_INSTANCE_WITH_CONDITION
enumerator SELECT_MODE_READ_NEXT_INSTANCE_WITH_CONDITION

Private Functions

dds::sub::LoanedSamples<T> read(const Selector &selector)
dds::sub::LoanedSamples<T> take(const Selector &selector)
template<typename SamplesFWIterator>
uint32_t read(SamplesFWIterator samples, uint32_t max_samples, const Selector &selector)
template<typename SamplesFWIterator>
uint32_t take(SamplesFWIterator samples, uint32_t max_samples, const Selector &selector)
template<typename SamplesBIIterator>
uint32_t read(SamplesBIIterator samples, const Selector &selector)
template<typename SamplesBIIterator>
uint32_t take(SamplesBIIterator samples, const Selector &selector)

Private Members

dds::sub::Subscriber sub_
dds::sub::status::DataState status_filter_
T typed_sample_
template<typename T>
class dds::sub::DataReaderListener
#include <DataReaderListener.hpp>

DataReader events Listener.

Since a DataReader is an Entity, it has the ability to have a Listener associated with it. In this case, the associated Listener should be of type DataReaderListener. This interface must be implemented by the application. A user-defined class must be provided by the application which must extend from the DataReaderListener class.

The DataReaderListener provides a generic mechanism (actually a callback function) for the Data Distribution Service to notify the application of relevant asynchronous status change events, such as a missed deadline, violation of a QosPolicy setting, etc. The DataReaderListener is related to changes in communication status StatusConditions.

// Application example listener
class ExampleListener :
               public virtual dds::sub::DataReaderListener<Foo::Bar>
{
public:
    virtual void on_requested_deadline_missed (
        dds::sub::DataReader<Foo::Bar>& reader,
        const dds::core::status::RequestedDeadlineMissedStatus & status)
    {
        std::cout << "on_requested_deadline_missed" << std::endl;
    }

    virtual void on_requested_incompatible_qos (
        dds::sub::DataReader<Foo::Bar>& reader,
        const dds::core::status::RequestedIncompatibleQosStatus & status)
    {
        std::cout << "on_requested_incompatible_qos" << std::endl;
    }

    virtual void on_sample_rejected (
        dds::sub::DataReader<Foo::Bar>& reader,
        const dds::core::status::SampleRejectedStatus & status)
    {
        std::cout << "on_sample_rejected" << std::endl;
    }

    virtual void on_liveliness_changed (
        dds::sub::DataReader<Foo::Bar>& reader,
        const dds::core::status::LivelinessChangedStatus & status)
    {
        std::cout << "on_liveliness_changed" << std::endl;
    }

    virtual void on_data_available (
        dds::sub::DataReader<Foo::Bar>& reader)
    {
        std::cout << "on_data_available" << std::endl;
    }

    virtual void on_subscription_matched (
        dds::sub::DataReader<Foo::Bar>& reader,
        const dds::core::status::SubscriptionMatchedStatus & status)
    {
        std::cout << "on_subscription_matched" << std::endl;
    }

    virtual void on_sample_lost (
        dds::sub::DataReader<Foo::Bar>& reader,
        const dds::core::status::SampleLostStatus & status)
    {
        std::cout << "on_sample_lost" << std::endl;
    }
};

// Create DataReader with the listener
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber,
                                      topic,
                                      subscriber.default_datareader_qos(),
                                      new ExampleListener(),
                                      dds::core::status::StatusMask::all());

See

for more information: Data Reader

See

for more information: Listener information

Public Functions

virtual void on_requested_deadline_missed(DataReader<T> &reader, const dds::core::status::RequestedDeadlineMissedStatus &status) = 0

This operation called by the Data Distribution Service when the deadline that the DataReader was expecting through its DeadlineQosPolicy was not respected for a specific instance.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::requested_deadline_missed().

Parameters
  • reader – contain a pointer to the DataReader for which the deadline was missed (this is an input to the application provided by the Data Distribution Service).

  • status – contain the RequestedDeadlineMissedStatus object (this is an input to the application provided by the Data Distribution Service).

virtual void on_requested_incompatible_qos(DataReader<T> &reader, const dds::core::status::RequestedIncompatibleQosStatus &status) = 0

This operation is called by the Data Distribution Service when the RequestedIncompatibleQosStatus changes.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::requested_incompatible_qos().

The Data Distribution Service will provide a reference to the DataReader in the parameter reader and the RequestedIncompatibleQosStatus object in the parameter status, for use by the application.

When the DataReaderListener on the DataReader is not enabled with the StatusMask::requested_incompatible_qos(), the RequestedIncompatibleQosStatus change will propagate to the SubscriberListener of the Subscriber (if enabled) or to the DomainParticipantListener of the DomainParticipant (if enabled).

Parameters
  • reader – the DataReader provided by the Data Distribution Service.

  • status – the RequestedIncompatibleQosStatus object provided by the Data Distribution Service.

virtual void on_sample_rejected(DataReader<T> &reader, const dds::core::status::SampleRejectedStatus &status) = 0

This operation called by the Data Distribution Service when a (received) sample has been rejected.

Samples may be rejected by the DataReader when it runs out of resource_limits to store incoming samples. Usually this means that old samples need to be ‘consumed’ (for example by ‘taking’ them instead of ‘reading’ them) to make room for newly incoming samples.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled with the StatusMask::sample_lost().

Parameters
  • reader – contains a pointer to the DataReader for which a sample has been rejected (this is an input to the application provided by the Data Distribution Service).

  • status – contains the SampleRejectedStatus object (this is an input to the application provided by the Data Distribution Service).

virtual void on_liveliness_changed(DataReader<T> &reader, const dds::core::status::LivelinessChangedStatus &status) = 0

This operation is called by the Data Distribution Service when the liveliness of one or more DataWriter objects that were writing instances read through this DataReader has changed.

In other words, some DataWriter have become “alive” or “not alive”. The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::liveliness_changed().

Parameters
  • reader – contain a pointer to the DataReader for which the liveliness of one or more DataWriter objects has changed (this is an input to the application provided by the Data Distribution Service).

  • status – contain the LivelinessChangedStatus object (this is an input to the application provided by the Data Distribution Service).

virtual void on_data_available(DataReader<T> &reader) = 0

This operation is called by the Data Distribution Service when new data is available for this DataReader.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::data_available().

The Data Distribution Service will provide a reference to the DataReader in the parameter reader for use by the application.

The statuses StatusMask::data_on_readers() and StatusMask::data_available() will occur together. In case these status changes occur, the Data Distribution Service will look for an attached and activated SubscriberListener or DomainParticipantListener (in that order) for the enabled StatusMask::data_on_readers(). In case the StatusMask::data_on_readers() can not be handled, the Data Distribution Service will look for an attached and activated DataReaderListener, SubscriberListener or DomainParticipantListener for the enabled StatusMask::data_available() (in that order).

Note that if on_data_on_readers is called, then the Data Distribution Service will not try to call on_data_available, however, the application can force a call to the DataReader objects that have data by means of the Subscriber::notify_datareaders() operation.

Parameters

reader – contain a pointer to the DataReader for which data is available (this is an input to the application provided by the Data Distribution Service).

virtual void on_subscription_matched(DataReader<T> &reader, const dds::core::status::SubscriptionMatchedStatus &status) = 0

This operation is called by the Data Distribution Service when a new match has been discovered for the current subscription, or when an existing match has ceased to exist.

Usually this means that a new DataWriter that matches the Topic and that has compatible Qos as the current DataReader has either been discovered, or that a previously discovered DataWriter has ceased to be matched to the current DataReader. A DataWriter may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current DataReader or when either the DataReader or the DataWriter has chosen to put its matching counterpart on its ignore-list using the dds::sub::ignore or dds::pub::ignore operations.

The implementation of this Listener operation may be left empty when this functionality is not needed: it will only be called when the relevant DataReaderListener is installed and enabled for the StatusMask::subscription_matched().

Parameters
  • reader – contains a pointer to the DataReader for which a match has been discovered (this is an input to the application provided by the Data Distribution Service).

  • status – contains the SubscriptionMatchedStatus object (this is an input to the application provided by the Data Distribution Service).

virtual void on_sample_lost(DataReader<T> &reader, const dds::core::status::SampleLostStatus &status) = 0

Parameters
  • reader – the DataReader the Listener is applied to

  • status – the SampleLostStatus status

class dds::sub::qos::DataReaderQos : public dds::core::EntityQos<org::eclipse::cyclonedds::sub::qos::DataReaderQosDelegate>
#include <DataReaderQos.hpp>

This class provides the basic mechanism for an application to specify Quality of Service attributes for a DataReader.

A QosPolicy can be set when the DataReader is created or modified with the set qos operation. Both operations take the DataReaderQos object as a parameter. There may be cases where several policies are in conflict. Consistency checking is performed each time the policies are modified when they are being created and, in case they are already enabled, via the set qos operation.

Attributes

QosPolicy

Desciption

Default Value

dds::core::policy::Durability

Data storage settings for late joiners (info)

Durability::Volatile()

dds::core::policy::Deadline

Period in which new sample is written (info)

Deadline::Deadline(infinite)

dds::core::policy::LatencyBudget

Used for optimization (info)

LatencyBudget::LatencyBudget(zero)

dds::core::policy::Liveliness

Liveliness assertion mechanism (info)

Liveliness::Automatic()

dds::core::policy::Reliability

Reliability settings (info)

Reliability::BestEffort()

dds::core::policy::DestinationOrder

DataReader data order settings (info)

DestinationOrder::ReceptionTimestamp()

dds::core::policy::History

Data storage settings (info)

History::KeepLast(depth 1)

dds::core::policy::ResourceLimits

Maximum resource settings (info)

ResourceLimits::ResourceLimits(all unlimited)

dds::core::policy::UserData

Additional information (info)

UserData::UserData(empty)

dds::core::policy::Ownership

Exclusive ownership or not (info)

Ownership::Shared()

dds::core::policy::TimeBasedFilter

Maximum data rate (info)

TimeBasedFilter::TimeBasedFilter(0)

dds::core::policy::ReaderDataLifecycle

Instance state changes and notifications (info)

ReaderDataLifecycle::NoAutoPurgeDisposedSamples()

Some QosPolicy have “immutable” semantics meaning that they can only be specified either at DataReader creation time or prior to calling the enable operation on the DataReader.

See

for more information: DCPS_QoS

Public Functions

inline DataReaderQos()

Create a default QoS.

DataReaderQos(const DataReaderQos &qos)

Create copied QoS.

Parameters

qos – the QoS to copy policies from.

DataReaderQos(const dds::topic::qos::TopicQos &qos)

Create a DataReader QoS from a TopicQos.

This operation will copy the QosPolicy settings from the TopicQos to the corresponding QosPolicy settings in the DataReaderQos. The related value in DataReaderQos will be repliced, while the other policies will get the default QoS policies.

This is a “convenience” operation. It can be used to merge default DataReader QosPolicy settings with the corresponding ones on the Topic. The resulting DataReaderQos can then be used to create a new DataReader, or set its DataReaderQos.

dds::topic::qos::TopicQos topicQos = topic.qos();
dds::sub::qos::DataReaderQos readerQos(topicQos);
// Policies of the DataReaderQos that are not present in the TopicQos
// have the default value.

This operation does not check the resulting DataReaderQos for self consistency. This is because the “merged” DataReaderQos may not be the final one, as the application can still modify some QosPolicy settings prior to applying the DataReaderQos to the DataReader.

Parameters

qos – the QoS to copy policies from.

DataReaderQos &operator=(const dds::topic::qos::TopicQos &other)

Assign dds::topic::qos::TopicQos policies to the DataReaderQos.

This operation will copy the QosPolicy settings from the TopicQos to the corresponding QosPolicy settings in the DataReaderQos (replacing the values, if present).

This is a “convenience” operation, useful in combination with the operations Subscriber::default_datareader_qos() and dds::topic::Topic::qos(). This operation can be used to merge the DataReader QosPolicy settings with the corresponding ones on the Topic. The resulting DataReaderQos can then be used to create a new DataReader, or set its DataReaderQos.

dds::topic::qos::TopicQos topicQos = topic.qos();
dds::sub::qos::DataReaderQos readerQos = subscriber.default_datareader_qos();
readerQos = topicQos;
// Policies of the DataReaderQos that are not present in the TopicQos are untouched.

This operation does not check the resulting DataReaderQos for self consistency. This is because the “merged” DataReaderQos may not be the final one, as the application can still modify some QosPolicy settings prior to applying the DataReaderQos to the DataReader.

Parameters

qos – the QoS to copy policies from.

class org::eclipse::cyclonedds::sub::qos::DataReaderQosDelegate

Public Functions

DataReaderQosDelegate()
DataReaderQosDelegate(const org::eclipse::cyclonedds::topic::qos::TopicQosDelegate &tqos)
void policy(const dds::core::policy::UserData &user_data)
void policy(const dds::core::policy::Durability &durability)
void policy(const dds::core::policy::Deadline &deadline)
void policy(const dds::core::policy::LatencyBudget &budget)
void policy(const dds::core::policy::Liveliness &liveliness)
void policy(const dds::core::policy::Reliability &reliability)
void policy(const dds::core::policy::DestinationOrder &order)
void policy(const dds::core::policy::History &history)
void policy(const dds::core::policy::ResourceLimits &resources)
void policy(const dds::core::policy::Ownership &ownership)
void policy(const dds::core::policy::TimeBasedFilter &tfilter)
void policy(const dds::core::policy::ReaderDataLifecycle &lifecycle)
template<typename POLICY>
const POLICY &policy() const
template<typename POLICY>
POLICY &policy()
dds_qos_t *ddsc_qos() const
void ddsc_qos(const dds_qos_t *qos)
void named_qos(const struct _DDS_NamedDataReaderQos &qos)
void check() const
bool operator==(const DataReaderQosDelegate &other) const
DataReaderQosDelegate &operator=(const org::eclipse::cyclonedds::topic::qos::TopicQosDelegate &tqos)
template<>
inline dds::core::policy::Durability &policy()
template<>
inline dds::core::policy::UserData &policy()
template<>
inline dds::core::policy::Deadline &policy()
template<>
inline dds::core::policy::LatencyBudget &policy()
template<>
inline dds::core::policy::Liveliness &policy()
template<>
inline dds::core::policy::Reliability &policy()
template<>
inline dds::core::policy::DestinationOrder &policy()
template<>
inline dds::core::policy::History &policy()
template<>
inline dds::core::policy::ResourceLimits &policy()
template<>
inline dds::core::policy::Ownership &policy()
template<>
inline dds::core::policy::TimeBasedFilter &policy()
template<>
inline dds::core::policy::ReaderDataLifecycle &policy()

Private Members

dds::core::policy::UserData user_data_
dds::core::policy::Durability durability_
dds::core::policy::Deadline deadline_
dds::core::policy::LatencyBudget budget_
dds::core::policy::Liveliness liveliness_
dds::core::policy::Reliability reliability_
dds::core::policy::DestinationOrder order_
dds::core::policy::History history_
dds::core::policy::ResourceLimits resources_
dds::core::policy::Ownership ownership_
dds::core::policy::TimeBasedFilter tfilter_
dds::core::policy::ReaderDataLifecycle lifecycle_
class dds::sub::status::DataState
#include <DataState.hpp>

Class to hold sample DataState information.

The DataState is part of dds::sub::SampleInfo but can also be used as data filter for DataReaders.

The DataState contains the following:

  • The sample_state of the Data value (i.e., if the sample has already been READ or NOT_READ by that same DataReader).

  • The view_state of the related instance (i.e., if the instance is NEW, or NOT_NEW for that DataReader).

  • The instance_state of the related instance (i.e., if the instance is ALIVE, NOT_ALIVE_DISPOSED, or NOT_ALIVE_NO_WRITERS).

See

for more information: SampleInfo

Public Functions

inline DataState()

Create a DataState instance.

Construct a DataState with:

inline DataState(const dds::sub::status::SampleState &ss)

Create a DataState instance.

Construct a DataState with:

Parameters

ss – the SampleState to construct DataState from

inline DataState(const dds::sub::status::ViewState &vs)

Create a DataState instance.

Construct a DataState with:

Parameters

vs – the ViewState to construct DataState from

inline DataState(const dds::sub::status::InstanceState &is)

Create a DataState instance.

Construct a DataState with:

Parameters

isInstanceState to construct DataState from

inline DataState(const dds::sub::status::SampleState &ss, const dds::sub::status::ViewState &vs, const dds::sub::status::InstanceState &is)

Create a DataState instance.

Construct a DataState with:

Parameters
inline DataState &operator<<(const dds::sub::status::SampleState &ss)

Set SampleState.

Parameters

ssSampleState

inline DataState &operator<<(const dds::sub::status::InstanceState &is)

Set InstanceState.

Parameters

isInstanceState

inline DataState &operator<<(const dds::sub::status::ViewState &vs)

Set ViewState.

Parameters

vsViewState

inline const DataState &operator>>(dds::sub::status::SampleState &ss) const

Get SampleState.

Parameters

ssSampleState

Returns

the DataState

inline const DataState &operator>>(dds::sub::status::InstanceState &is) const

Get InstanceState.

Parameters

isInstanceState

Returns

the DataState

inline const DataState &operator>>(dds::sub::status::ViewState &vs) const

Get ViewState.

Parameters

vsViewState

Returns

the DataState

inline bool operator==(const DataState &o) const

Check if this DataState is equal with another

Returns

true if equal

inline bool operator!=(const DataState &o) const

Check if this DataState is not equal with another

Returns

true if not equal

inline const dds::sub::status::SampleState &sample_state() const

Get SampleState.

Returns

the SampleState

inline void sample_state(const dds::sub::status::SampleState &ss)

Set SampleState.

Parameters

ssSampleState

inline const dds::sub::status::InstanceState &instance_state() const

Get InstanceState.

Returns

the InstanceState

inline void instance_state(const dds::sub::status::InstanceState &is)

Set InstanceState.

Parameters

isInstanceState

inline const dds::sub::status::ViewState &view_state() const

Get ViewState.

Returns

the ViewState

inline void view_state(const dds::sub::status::ViewState &vs)

Set ViewState.

Parameters

vsViewState

Public Static Functions

static inline DataState any()

Create a DataState instance.

Return a DataState with:

Returns

the any DataState

static inline DataState new_data()

Create a DataState instance.

Return a DataState with:

Returns

the new_data DataState

static inline DataState any_data()

Create a DataState instance.

Return a DataState with:

Returns

the any_data DataState

static inline DataState new_instance()

Create a DataState instance.

Return a DataState with:

Returns

the new_instance DataState

template<typename T>
class dds::pub::DataWriter : public dds::pub::AnyDataWriter
#include <DataWriter.hpp>

DataWriter allows the application to set the value of the sample to be published under a given Topic.

A DataWriter is attached to exactly one Publisher.

A DataWriter is bound to exactly one Topic and therefore to exactly one data type. The Topic must exist prior to the DataWriter’s creation. DataWriter is an abstract class. It must be specialized for each particular application data type. For a fictional application data type Bar (defined in the module Foo) the specialized class would be dds::pub::DataWriter<Foo::Bar>.

The pre-processor generates from IDL type descriptions the application DataWriter<type> classes. For each application data type that is used as Topic data type, a typed class DataWriter<type> is derived from the AnyDataWriter class.

For instance, for an application, the definitions are located in the Foo.idl file. The pre-processor will generate a ccpp_Foo.h include file.

General note: The name ccpp_Foo.h is derived from the IDL file Foo.idl, that defines Foo::Bar, for all relevant DataWriter<Foo::Bar> operations.

// Default creation of a DataWriter
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::pub::Publisher publisher(participant);
dds::pub::DataWriter<Foo::Bar> writer(publisher, topic);

// Default write of a sample on the DataWriter
Foo::Bar sample;
writer.write(sample);

Note

Apart from idl files, Google protocol buffers are also supported. For the API itself, it doesn’t matter if the type header files were generated from idl or protocol buffers. The resulting API usage and includes remain the same.

See

for more information: Publication concept

See

for more information: DataWriter concept

Public Types

typedef dds::pub::DataWriterListener<T> Listener

Local convenience typedef for dds::pub::DataWriterListener.

Public Functions

DataWriter(const dds::pub::Publisher &pub, const ::dds::topic::Topic<T> &topic)

Create a new DataWriter for the desired Topic, using the given Publisher.

The DataWriter will be created with the QoS values specified on the last successful call to pub.default_datawriter_qos(qos) or, if the call was never made, the default values.

Parameters
Throws
DataWriter(const dds::pub::Publisher &pub, const ::dds::topic::Topic<T> &topic, const dds::pub::qos::DataWriterQos &qos, dds::pub::DataWriterListener<T> *listener = NULL, const dds::core::status::StatusMask &mask = ::dds::core::status::StatusMask::none())

Create a new DataWriter for the desired Topic, using the given Publisher and DataWriterQos and attaches the optionally specified DataWriterListener to it.

QoS A possible application pattern to construct the DataWriterQos for the DataWriter is to:

// 1) Retrieve the QosPolicy settings on the associated Topic
dds::topic::qos::TopicQos topicQos = topic.qos();
// 2) Retrieve the default DataWriterQos from the related Publisher
dds::pub::qos::DataWriterQos writerQos = publisher.default_datawriter_qos();
// 3) Combine those two lists of QosPolicy settings by overwriting DataWriterQos
//    policies that are also present TopicQos
writerQos = topicQos;
// 4) Selectively modify QosPolicy settings as desired.
writerQos << dds::core::policy::WriterDataLifecycle::ManuallyDisposeUnregisteredInstances();
// 5) Use the resulting QoS to construct the DataWriter.
dds::pub::DataWriter<Foo::Bar> writer(publisher, topic, writerQos);

Listener The following statuses are applicable to the DataWriterListener:

See listener concept, communication status and communication propagation for more information.

Parameters
Throws
void write(const T &sample)

This operation modifies the value of a data instance.

Detailed Description

This operation modifies the value of a data instance. When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Blocking If the dds::core::policy::History QosPolicy is set to KEEP_ALL, the write operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the dds::core::policy::ResourceLimits, is exceeded. In case the synchronous attribute value of the dds::core::policy::Reliability is set to TRUE for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the max_blocking_time attribute of the dds::core::policy::Reliability configures the maximum time the write operation may block (either waiting for space to become available or data to be acknowledged). If max_blocking_time elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the write operation will fail and throw TimeoutError.

Parameters

sample – the sample to be written

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

void write(const T &sample, const dds::core::Time &timestamp)

This operation modifies the value of a data instance and provides a value for the source_timestamp explicitly.

Detailed Description

It modifies the values of the given data instances. When this operation is used, the application provides the value for the parameter source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Blocking This operation can be blocked (see write blocking).

Parameters
  • sample – the sample to be written

  • timestamp – the timestamp used for this sample

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

void write(const T &sample, const ::dds::core::InstanceHandle &instance)

This operation modifies the value of a data instance.

Detailed Description

This operation modifies the value of a data instance. When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Before writing data to an instance, the instance may be registered with the “register_instance” or “register_instance_w_timestamp” The handle returned by one of the register_instance operations can be supplied to the parameter handle of the write operation. However, it is also possible to supply a default InstanceHandle (InstanceHandle.is_nil() == true), which means that the identity of the instance is automatically deduced from the instance_data (identified by the key).

Instance Handle The default InstanceHandle (InstanceHandle.is_nil() == true) can be used for the parameter handle. This indicates the identity of the instance is automatically deduced from the instance_data (by means of the key).

If handle is not nil, it must correspond to the value returned by “register_instance” or “register_instance_w_timestamp”

when the instance (identified by its key) was registered. Passing such a registered handle helps the Data Distribution Service to process the sample more efficiently.

If there is no correspondence between handle and sample, the result of the operation is unspecified.

Blocking This operation can be blocked (see write blocking).

Parameters
  • sample – the sample to be written

  • instance – the handle representing the instance written

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

void write(const T &data, const ::dds::core::InstanceHandle &instance, const dds::core::Time &timestamp)

This operation modifies the value of a data instance and provides a value for the source_timestamp explicitly.

Detailed Description

It modifies the values of the given data instances. When this operation is used, the application provides the value for the parameter source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Instance Handle See write instance handle.

Blocking This operation can be blocked (see write blocking).

Parameters
  • data – the sample to be written

  • instance – the handle representing the instance written

  • timestamp – the timestamp to use for this sample

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

void write(const dds::topic::TopicInstance<T> &i)

This operation modifies the value of a data instance.

Detailed Description

This operation modifies the value of a data instance. When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Topic Instance A TopicInstance encapsulates a sample and its associated instance handle.

Parameters

i – the instance to write

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

void write(const dds::topic::TopicInstance<T> &i, const dds::core::Time &timestamp)

This operation modifies the value of a data instance and provides a value for the source_timestamp explicitly.

Detailed Description

It modifies the values of the given data instances. When this operation is used, the application provides the value for the parameter source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Topic Instance A TopicInstance encapsulates a sample and its associated instance handle.

Blocking This operation can be blocked (see write blocking).

Parameters
  • i – the instance to write

  • timestamp – the timestamp for this sample

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

template<typename FWIterator>
void write(const FWIterator &begin, const FWIterator &end)

This operation writes a series of typed Samples or TopicInstances.

Detailed Description This operation takes a sequence of typed Samples or TopicInstances, which is determined by the template specialization.

It modifies the values of the given data instances. When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Topic Instance A TopicInstance encapsulates a typed Sample and its associated instance handle.

Blocking This operation can be blocked (see write blocking).

Parameters
  • begin – An iterator pointing to the beginning of a sequence of Samples or a sequence of TopicInstances

  • end – An iterator pointing to the end of a sequence of Samples or a sequence of TopicInstances

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

template<typename FWIterator>
void write(const FWIterator &begin, const FWIterator &end, const dds::core::Time &timestamp)

This operation writes a series of typed Samples or TopicInstances and provides a value for the source_timestamp for these samples explicitly.

Detailed Description This operation takes a sequence of typed Samples or TopicInstances, which is determined by the template specialization.

It modifies the values of the given data instances. When this operation is used, the application provides the value for the parameter source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Topic Instance A TopicInstance encapsulates a sample and its associated instance handle.

Blocking This operation can be blocked (see write blocking).

Parameters
  • begin – an iterator pointing to the beginning of a sequence of TopicInstances

  • end – an iterator pointing to the end of a sequence of TopicInstances

  • timestamp – the time stamp

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

template<typename SamplesFWIterator, typename HandlesFWIterator>
void write(const SamplesFWIterator &data_begin, const SamplesFWIterator &data_end, const HandlesFWIterator &handle_begin, const HandlesFWIterator &handle_end)

This operation writes a series of typed Samples and their parallel instance handles.

Detailed Description

It modifies the values of the given data instances. When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Instance Handle See write instance handle.

Blocking This operation can be blocked (see write blocking).

Parameters
  • data_begin – an iterator pointing to the beginning of a sequence of samples

  • data_end – an iterator pointing to the end of a sequence of samples

  • handle_begin – an iterator pointing to the beginning of a sequence of InstanceHandles

  • handle_end – an iterator pointing to the end of a sequence of InstanceHandles

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

template<typename SamplesFWIterator, typename HandlesFWIterator>
void write(const SamplesFWIterator &data_begin, const SamplesFWIterator &data_end, const HandlesFWIterator &handle_begin, const HandlesFWIterator &handle_end, const dds::core::Time &timestamp)

This operation writes a series of typed Samples or TopicInstances and provides a value for the source_timestamp for these samples explicitly.

Detailed Description

It modifies the values of the given data instances. When this operation is used, the application provides the value for the parameter source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Instance Handle See write instance handle.

Blocking This operation can be blocked (see write blocking).

Parameters
  • data_begin – an iterator pointing to the beginning of a sequence of samples

  • data_end – an iterator pointing to the end of a sequence of samples

  • handle_begin – an iterator pointing to the beginning of a sequence of InstanceHandles

  • handle_end – an iterator pointing to the end of a sequence of InstanceHandles

  • timestamp – the time stamp

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &operator<<(const T &data)

This operation modifies the value of a data instance.

Detailed Description

This operation modifies the value of a data instance. When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Blocking If the dds::core::policy::History QosPolicy is set to KEEP_ALL, the write operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the dds::core::policy::ResourceLimits, is exceeded. In case the synchronous attribute value of the dds::core::policy::Reliability is set to TRUE for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the max_blocking_time attribute of the dds::core::policy::Reliability configures the maximum time the write operation may block (either waiting for space to become available or data to be acknowledged). If max_blocking_time elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the write operation will fail and throw TimeoutError.

Parameters

sample – the sample to be written

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &operator<<(const std::pair<T, dds::core::Time> &data)

This operation modifies the value of a data instance and provides a value for the source_timestamp explicitly.

Detailed Description

It modifies the values of the given data instances. When this operation is used, the application provides the value for the parameter source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Blocking This operation can be blocked (see write blocking).

Parameters
  • sample – the sample to be written

  • timestamp – the timestamp used for this sample

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &operator<<(const std::pair<T, ::dds::core::InstanceHandle> &data)

This operation modifies the value of a data instance.

Detailed Description

This operation modifies the value of a data instance. When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Before writing data to an instance, the instance may be registered with the “register_instance” or “register_instance_w_timestamp” The handle returned by one of the register_instance operations can be supplied to the parameter handle of the write operation. However, it is also possible to supply a default InstanceHandle (InstanceHandle.is_nil() == true), which means that the identity of the instance is automatically deduced from the instance_data (identified by the key).

Instance Handle The default InstanceHandle (InstanceHandle.is_nil() == true) can be used for the parameter handle. This indicates the identity of the instance is automatically deduced from the instance_data (by means of the key).

If handle is not nil, it must correspond to the value returned by “register_instance” or “register_instance_w_timestamp”

when the instance (identified by its key) was registered. Passing such a registered handle helps the Data Distribution Service to process the sample more efficiently.

If there is no correspondence between handle and sample, the result of the operation is unspecified.

Blocking This operation can be blocked (see write blocking).

Parameters
  • sample – the sample to be written

  • instance – the handle representing the instance written

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

const ::dds::core::InstanceHandle register_instance(const T &key)

This operation informs the Data Distribution Service that the application will be modifying a particular instance.

Detailed Description

This operation informs the Data Distribution Service that the application will be modifying a particular instance. This operation may be invoked prior to calling any operation that modifies the instance, such as write, unregister_instance or dispose_instance.

When the application does register the instance before modifying, the Data Distribution Service will handle the instance more efficiently. It takes as a parameter (instance_data) an instance (to get the key value) and returns a handle that can be used in successive

DataWriter operations. In case of an error, a HANDLE_NIL handle (InstanceHandle.is_nil() == true) is returned.

The explicit use of this operation is optional as the application can directly call the write, unregister_instance or dispose_instance operations without InstanceHandle, which indicate that the sample should be examined to identify the instance.

When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

Blocking If the dds::core::policy::History QosPolicy is set to KEEP_ALL, the register_instance operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the dds::core::policy::ResourceLimits, is exceeded. In case the synchronous attribute value of the dds::core::policy::Reliability is set to TRUE for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the max_blocking_time attribute of the dds::core::policy::Reliability configures the maximum time the register operation may block (either waiting for space to become available or data to be acknowledged). If max_blocking_time elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the register_instance operation will fail will return a nil InstanceHandle.

Multiple Calls If this operation is called for an already registered instance, it just returns the already allocated instance handle. This may be used to look up and retrieve the handle allocated to a given instance.

Key The key is a typed Sample of which the key fields are set so that the instance can be identified.

Parameters

key – the key of the instance to register

Throws
Returns

the instance handle

const ::dds::core::InstanceHandle register_instance(const T &key, const dds::core::Time &timestamp)

This operation will inform the Data Distribution Service that the application will be modifying a particular instance and provides a value for the source_timestamp explicitly.

Detailed Description

This operation informs the Data Distribution Service that the application will be modifying a particular instance. This operation may be invoked prior to calling any operation that modifies the instance, such as write, unregister_instance or dispose_instance.

When the application does register the instance before modifying, the Data Distribution Service will handle the instance more efficiently. It takes as a parameter (instance_data) an instance (to get the key value) and returns a handle that can be used in successive

DataWriter operations. In case of an error, a HANDLE_NIL handle (InstanceHandle.is_nil() == true) is returned.

The explicit use of this operation is optional as the application can directly call the write, unregister_instance or dispose_instance operations without InstanceHandle, which indicate that the sample should be examined to identify the instance.

When this operation is used, the application provides the value for the parameter source_timestamp that is made available to connected DataReader objects.

This timestamp is important for the interpretation of the

dds::core::policy::DestinationOrder QosPolicy.

Blocking This operation can be blocked (see register blocking).

Multiple Calls If this operation is called for an already registered instance, it just returns the already allocated instance handle. The source_timestamp is ignored in that case.

Key The key is a typed Sample of which the key fields are set so that the instance can be identified.

Parameters
  • key – the key of the instance to register

  • timestamp – the timestamp used for registration

Throws
Returns

the instance handle

DataWriter &unregister_instance(const ::dds::core::InstanceHandle &i)

This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more.

Detailed Description This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more. Therefore, this operation reverses the action of “register_instance” or “register_instance_w_timestamp”

. register_instance or register_instance_w_timestamp.

It should only be called on an instance that is currently registered. This operation should be called just once per instance, regardless of how many times

register_instance

was called for that instance.

This operation also indicates that the Data Distribution Service can locally remove all information regarding that instance. The application should not attempt to use the handle, previously allocated to that instance, after calling this operation.

When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the dds::core::policy::DestinationOrder QosPolicy.

Effects If, after unregistering, the application wants to modify (write or dispose) the instance, it has to register the instance again, or it has to use the default instance handle (InstanceHandle.is_nil() == true). This operation does not indicate that the instance should be deleted (that is the purpose of the dispose. This operation just indicates that the DataWriter no longer has “anything to say” about the instance. If there is no other DataWriter that has registered the instance as well, then the dds::sub::status::InstanceState in all connected DataReaders will be changed to not_alive_no_writers, provided this InstanceState was not already set to not_alive_disposed. In the last case the InstanceState will not be effected by the unregister_instance call, see also Sample info concept.

This operation can affect the ownership of the data instance. If the DataWriter was the exclusive owner of the instance, calling this operation will release that ownership, meaning ownership may be transferred to another, possibly lower strength, DataWriter.

The operation must be called only on registered instances. Otherwise the operation trow PreconditionNotMetError.

Blocking If the dds::core::policy::History QosPolicy is set to KEEP_ALL, the unregister_instance operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the dds::core::policy::ResourceLimits, is exceeded. In case the synchronous attribute value of the dds::core::policy::Reliability is set to TRUE for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the max_blocking_time attribute of the dds::core::policy::Reliability configures the maximum time the unregister operation may block (either waiting for space to become available or data to be acknowledged). If max_blocking_time elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the unregister_instance operation will fail and throw TimeoutError.

Parameters

i – the instance to unregister

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &unregister_instance(const ::dds::core::InstanceHandle &i, const dds::core::Time &timestamp)

This operation will inform the Data Distribution Service that the application will not be modifying a particular instance any more and provides a value for the source_timestamp explicitly.

Detailed Description This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more. Therefore, this operation reverses the action of “register_instance” or “register_instance_w_timestamp”

. register_instance or register_instance_w_timestamp.

It should only be called on an instance that is currently registered. This operation should be called just once per instance, regardless of how many times

register_instance

was called for that instance.

This operation also indicates that the Data Distribution Service can locally remove all information regarding that instance. The application should not attempt to use the handle, previously allocated to that instance, after calling this operation.

When this operation is used, the application itself supplied the value of the source_timestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the dds::core::policy::DestinationOrder QosPolicy.

Effects See here for the unregister effects.

Blocking This operation can be blocked (see unregister blocking).

Parameters
  • i – the instance to unregister

  • timestamp – the timestamp

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &unregister_instance(const T &key)

This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more.

Detailed Description This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more. Therefore, this operation reverses the action of “register_instance” or “register_instance_w_timestamp”

. register_instance or register_instance_w_timestamp.

It should only be called on an instance that is currently registered. This operation should be called just once per instance, regardless of how many times

register_instance

was called for that instance.

This operation also indicates that the Data Distribution Service can locally remove all information regarding that instance. The application should not attempt to use the handle, previously allocated to that instance, after calling this operation.

When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the dds::core::policy::DestinationOrder QosPolicy.

Effects See here for the unregister effects.

Blocking This operation can be blocked (see unregister blocking).

Instance The instance is identified by the key fields of the given typed data sample, instead of an InstanceHandle.

Parameters

key – sample of the instance to dispose

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &unregister_instance(const T &key, const dds::core::Time &timestamp)

This operation will inform the Data Distribution Service that the application will not be modifying a particular instance any more and provides a value for the source_timestamp explicitly.

Detailed Description This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more. Therefore, this operation reverses the action of “register_instance” or “register_instance_w_timestamp”

. register_instance or register_instance_w_timestamp.

It should only be called on an instance that is currently registered. This operation should be called just once per instance, regardless of how many times

register_instance

was called for that instance.

This operation also indicates that the Data Distribution Service can locally remove all information regarding that instance. The application should not attempt to use the handle, previously allocated to that instance, after calling this operation.

When this operation is used, the application itself supplied the value of the source_timestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the dds::core::policy::DestinationOrder QosPolicy.

Effects See here for the unregister effects.

Blocking This operation can be blocked (see unregister blocking).

Instance The instance is identified by the key fields of the given typed data sample, instead of an InstanceHandle.

Parameters
  • key – sample of the instance to dispose

  • timestamp – the timestamp

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &dispose_instance(const ::dds::core::InstanceHandle &i)

This operation requests the Data Distribution Service to mark the instance for deletion.

Detailed Description This operation requests the Data Distribution Service to mark the instance for deletion. Copies of the instance and its corresponding samples, which are stored in every connected DataReader and, dependent on the QosPolicy settings, also in the Transient and Persistent stores, will be marked for deletion by setting their dds::sub::status::InstanceState to not_alive_disposed state.

When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Effects on DataReaders Actual deletion of the instance administration in a connected DataReader will be postponed until the following conditions have been met:

  • the instance must be unregistered (either implicitly or explicitly) by all connected DataWriters that have previously registered it.

    • A DataWriter can register an instance explicitly by using the special register_instance operations.

    • A DataWriter can register an instance implicitly by using no or the default (nil) InstanceHandle in any of the other DataWriter operations.

    • A DataWriter can unregister an instance explicitly by using one of the special unregister_instance operations.

    • A DataWriter will unregister all its contained instances implicitly when it is deleted.

    • When a DataReader detects a loss of liveliness in one of its connected DataWriters, it will consider all instances registered by that DataWriter as being implicitly unregistered.

  • and the application must have consumed all samples belonging to the instance, either implicitly or explicitly.

    • An application can consume samples explicitly by invoking the take operation, or one of its variants, on its DataReaders.

    • The DataReader can consume disposed samples implicitly when the autopurge_disposed_samples_delay of the ReaderData Lifecycle QosPolicy has expired.

The DataReader may also remove instances that haven’t been disposed first: this happens when the autopurge_nowriter_samples_delay of the ReaderDataLifecycle QosPolicy has expired after the instance is considered unregistered by all connected DataWriters (i.e. when it has a InstanceState of not_alive_no_writers.

See also

dds::core::policy::ReaderDataLifecycle QosPolicy.

Effects on Transient/Persistent Stores Actual deletion of the instance administration in the connected Transient and Persistent stores will be postponed until the following conditions have been met:

  • the instance must be unregistered (either implicitly or explicitly) by all connected DataWriters that have previously registered it. (See above.)

  • and the period of time specified by the service_cleanup_delay attribute in the DurabilityServiceQosPolicy on the Topic must have elapsed after the instance is considered unregistered by all connected DataWriters.

See also dds::core::policy::Durability QosPolicy.

Instance Handle If handle is not nil, it must correspond to the value returned by “register_instance” or “register_instance_w_timestamp” when the instance (identified by its key) was registered. Passing such a registered handle helps the Data Distribution Service to process the sample more efficiently.

Blocking If the dds::core::policy::History QosPolicy is set to KEEP_ALL, the dispose operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the dds::core::policy::ResourceLimits, is exceeded. In case the synchronous attribute value of the dds::core::policy::Reliability is set to TRUE for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the max_blocking_time attribute of the dds::core::policy::Reliability configures the maximum time the dispose operation may block (either waiting for space to become available or data to be acknowledged). If max_blocking_time elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the dispose operation will fail and throw TimeoutError.

Parameters

i – the instance to dispose

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &dispose_instance(const ::dds::core::InstanceHandle &i, const dds::core::Time &timestamp)

This operation requests the Data Distribution Service to mark the instance for deletion and provides a value for the source_timestamp explicitly.

Detailed Description This operation requests the Data Distribution Service to mark the instance for deletion. Copies of the instance and its corresponding samples, which are stored in every connected DataReader and, dependent on the QosPolicy settings, also in the Transient and Persistent stores, will be marked for deletion by setting their dds::sub::status::InstanceState to not_alive_disposed state.

When this operation is used, the application explicitly supplies the value of the source_timestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Effects This operation effects DataReaders and effects Transient/Persistent Stores.

Instance Handle If handle is not nil, it must correspond to the value returned by “register_instance” or “register_instance_w_timestamp” when the instance (identified by its key) was registered. Passing such a registered handle helps the Data Distribution Service to process the sample more efficiently.

Blocking This operation can be blocked (see dispose blocking).

Parameters
  • i – the instance to dispose

  • timestamp – the timestamp

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &dispose_instance(const T &key)

This operation requests the Data Distribution Service to mark the instance for deletion.

Detailed Description This operation requests the Data Distribution Service to mark the instance for deletion. Copies of the instance and its corresponding samples, which are stored in every connected DataReader and, dependent on the QosPolicy settings, also in the Transient and Persistent stores, will be marked for deletion by setting their dds::sub::status::InstanceState to not_alive_disposed state.

When this operation is used, the Data Distribution Service will automatically supply the value of the source_timestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Effects This operation effects DataReaders and effects Transient/Persistent Stores.

Instance The instance is identified by the key fields of the given typed data sample, instead of an InstanceHandle.

Blocking This operation can be blocked (see dispose blocking).

Parameters

key – sample of the instance to dispose

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

DataWriter &dispose_instance(const T &key, const dds::core::Time &timestamp)

This operation requests the Data Distribution Service to mark the instance for deletion and provides a value for the source_timestamp explicitly.

Detailed Description This operation requests the Data Distribution Service to mark the instance for deletion. Copies of the instance and its corresponding samples, which are stored in every connected DataReader and, dependent on the QosPolicy settings, also in the Transient and Persistent stores, will be marked for deletion by setting their dds::sub::status::InstanceState to not_alive_disposed state.

When this operation is used, the application explicitly supplies the value of the source_timestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the dds::core::policy::DestinationOrder QosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing DomainParticipant.

Effects This operation effects DataReaders and effects Transient/Persistent Stores.

Instance The instance is identified by the key fields of the given typed data sample, instead of an InstanceHandle.

Blocking This operation can be blocked (see dispose blocking).

Parameters
  • key – sample of the instance to dispose

  • timestamp – the timestamp

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::NotEnabledError – The DataWriter has not yet been enabled.

  • dds::core::PreconditionNotMetError – The handle has not been registered with this DataWriter.

  • dds::core::TimeoutError – Either the current action overflowed the available resources as specified by the combination of the Reliability QosPolicy, History QosPolicy and ResourceLimits QosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the write operation, which could not be resolved before max_blocking_time of the Reliability QosPolicy elapsed.

dds::topic::TopicInstance<T> &key_value(dds::topic::TopicInstance<T> &i, const ::dds::core::InstanceHandle &h)

This operation retrieves the key value of a specific instance.

This operation can be used to retrieve the instance key that corresponds to an instance_handle. The operation will only fill the fields that form the key inside the sample instance.

This operation may raise a InvalidArgumentError exception if the InstanceHandle does not correspond to an existing data-object known to the DataWriter. If the implementation is not able to check invalid handles, then the result in this situation is unspecified.

The TopicInstance is added as parameter to be able to overload this operation.

Parameters
  • i[out] A topic instance to set the handle and sample key fields of

  • h[in] The instance handle

Throws
Returns

The given topic instance with the handle and key fields set

T &key_value(T &sample, const ::dds::core::InstanceHandle &h)

This operation retrieves the key value of a specific instance.

This operation can be used to retrieve the instance key that corresponds to an instance_handle. The operation will only fill the fields that form the key inside the sample instance.

This operation may raise a InvalidArgumentError exception if the InstanceHandle does not correspond to an existing data-object known to the DataWriter. If the implementation is not able to check invalid handles, then the result in this situation is unspecified.

The Sample is added as parameter to be able to overload this operation.

Parameters
  • sample[out] A sample to set the key fields of

  • h[in] The instance handle

Throws
Returns

The given sample with the key fields set

dds::core::InstanceHandle lookup_instance(const T &key)

This operation returns the value of the instance handle which corresponds to the instance_data.

The instance_data parameter is only used for the purpose of examining the fields that define the key. The instance handle can be used in any write, dispose or unregister operations (or their time stamped variants) that operate on a specific instance. Note that DataWriter instance handles are local, and are not interchangeable with DataReader instance handles nor with instance handles of an other DataWriter.

This operation does not register the instance in question. If the instance has not been previously registered or if for any other reason the Service is unable to provide an instance handle, the Service will return the default nil handle (InstanceHandle.is_nil() == true).

Parameters

key – the sample

Throws
Returns

the instance handle

DataWriter &operator<<(const ::dds::pub::qos::DataWriterQos &qos)

This operation replaces the existing set of QosPolicy settings for a DataWriter.

The parameter qos contains the object with the QosPolicy settings which is checked for self-consistency and mutability.

When the application tries to change a QosPolicy setting for an enabled DataWriter, which can only be set before the DataWriter is enabled, the operation will fail and a ImmutablePolicyError is thrown. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed.

When the qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicyError is thrown.

Parameters

qos – the qos

Throws
const dds::topic::Topic<T> &topic() const

Get the Topic associated with this DataWriter.

Throws
Returns

the Topic

void listener(DataWriterListener<T> *listener, const ::dds::core::status::StatusMask &mask)

Register a listener with the DataWriter.

This operation attaches a DataWriterListener to the DataWriter. Only one DataWriterListener can be attached to each DataWriter. If a DataWriterListener was already attached, the operation will replace it with the new one. When the listener is the NULL pointer, it represents a listener that is treated as a NOOP for all statuses activated in the bit mask.

Listener un-registration is performed by setting the listener to NULL and mask none().

Communication Status For each communication status, the StatusChangedFlag flag is initially set to FALSE. It becomes TRUE whenever that communication status changes. For each communication status activated in the mask, the associated DataWriterListener operation is invoked and the communication status is reset to FALSE, as the listener implicitly accesses the status which is passed as a parameter to that operation. The status is reset prior to calling the listener, so if the application calls the get_<status_name>_status from inside the listener it will see the status already reset. An exception to this rule is the NULL listener, which does not reset the communication statuses for which it is invoked.

The following statuses are applicable to the DataWriterListener:

Be aware that the PUBLICATION_MATCHED_STATUS is not applicable when the infrastructure does not have the information available to determine connectivity. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In this case the operation will throw UnsupportedError.

Status bits are declared as a constant and can be used by the application in an OR operation to create a tailored mask. The special constant dds::core::status::StatusMask::none() can be used to indicate that the created entity should not respond to any of its available statuses. The DDS will therefore attempt to propagate these statuses to its factory. The special constant dds::core::status::StatusMask::all() can be used to select all applicable statuses specified in the “Data Distribution Service for Real-time Systems Version 1.2” specification which are applicable to the PublisherListener.

Status Propagation In case a communication status is not activated in the mask of the DataWriterListener, the PublisherListener of the containing Publisher is invoked (if attached and activated for the status that occurred). This allows the application to set a default behaviour in the PublisherListener of the containing Publisher and a DataWriter specific behaviour when needed. In case the communication status is not activated in the mask of the PublisherListener as well, the communication status will be propagated to the DomainParticipantListener of the containing DomainParticipant. In case the DomainParticipantListener is also not attached or the communication status is not activated in its mask, the application is not notified of the change.

See also listener information.

Parameters
  • listener – the listener

  • mask – the mask defining the events for which the listener will be notified.

Throws
DataWriterListener<T> *listener() const

Get the listener of this DataWriter.

See also listener information.

Throws

dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

Returns

the listener

template<typename T>
class dds::pub::detail::DataWriter

Public Types

typedef ::dds::core::smart_ptr_traits<DataWriter<T>>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<DataWriter<T>>::weak_ref_type weak_ref_type

Public Functions

DataWriter(const dds::pub::Publisher &pub, const ::dds::topic::Topic<T> &topic, const dds::pub::qos::DataWriterQos &qos, dds::pub::DataWriterListener<T> *listener, const dds::core::status::StatusMask &mask)
virtual ~DataWriter()
void init(ObjectDelegate::weak_ref_type weak_ref)
bool is_loan_supported()
T &loan_sample()
void return_loan(T &sample)
void write_cdr(const org::eclipse::cyclonedds::topic::CDRBlob &sample)
void write_cdr(const org::eclipse::cyclonedds::topic::CDRBlob &sample, const dds::core::Time &timestamp)
void dispose_cdr(const org::eclipse::cyclonedds::topic::CDRBlob &sample)
void dispose_cdr(const org::eclipse::cyclonedds::topic::CDRBlob &sample, const dds::core::Time &timestamp)
void unregister_instance_cdr(const org::eclipse::cyclonedds::topic::CDRBlob &sample)
void unregister_instance_cdr(const org::eclipse::cyclonedds::topic::CDRBlob &sample, const dds::core::Time &timestamp)
void write(const T &sample)
void write(const T &sample, const dds::core::Time &timestamp)
void write(const T &sample, const ::dds::core::InstanceHandle &instance)
void write(const T &sample, const ::dds::core::InstanceHandle &instance, const dds::core::Time &timestamp)
void write(const dds::topic::TopicInstance<T> &i)
void write(const dds::topic::TopicInstance<T> &i, const dds::core::Time &timestamp)
void writedispose(const T &sample)
void writedispose(const T &sample, const dds::core::Time &timestamp)
void writedispose(const T &sample, const ::dds::core::InstanceHandle &instance)
void writedispose(const T &sample, const ::dds::core::InstanceHandle &instance, const dds::core::Time &timestamp)
void writedispose(const dds::topic::TopicInstance<T> &i)
void writedispose(const dds::topic::TopicInstance<T> &i, const dds::core::Time &timestamp)
template<typename FWIterator>
void writedispose(const FWIterator &begin, const FWIterator &end)
template<typename FWIterator>
void writedispose(const FWIterator &begin, const FWIterator &end, const dds::core::Time &timestamp)
template<typename SamplesFWIterator, typename HandlesFWIterator>
void writedispose(const SamplesFWIterator &data_begin, const SamplesFWIterator &data_end, const HandlesFWIterator &handle_begin, const HandlesFWIterator &handle_end)
template<typename SamplesFWIterator, typename HandlesFWIterator>
void writedispose(const SamplesFWIterator &data_begin, const SamplesFWIterator &data_end, const HandlesFWIterator &handle_begin, const HandlesFWIterator &handle_end, const dds::core::Time &timestamp)
const ::dds::core::InstanceHandle register_instance(const T &key, const dds::core::Time &timestamp)
void unregister_instance(const ::dds::core::InstanceHandle &handle, const dds::core::Time &timestamp)
void unregister_instance(const T &sample, const dds::core::Time &timestamp)
void dispose_instance(const ::dds::core::InstanceHandle &handle, const dds::core::Time &timestamp)
void dispose_instance(const T &sample, const dds::core::Time &timestamp)
dds::topic::TopicInstance<T> &key_value(dds::topic::TopicInstance<T> &i, const ::dds::core::InstanceHandle &h)
T &key_value(T &sample, const ::dds::core::InstanceHandle &h)
dds::core::InstanceHandle lookup_instance(const T &key)
const dds::topic::Topic<T> &topic() const
virtual const dds::pub::Publisher &publisher() const
void listener(DataWriterListener<T> *listener, const ::dds::core::status::StatusMask &mask)
DataWriterListener<T> *listener() const
virtual void close()
dds::pub::DataWriter<T, dds::pub::detail::DataWriter> wrapper()
void on_offered_deadline_missed(dds_entity_t, org::eclipse::cyclonedds::core::OfferedDeadlineMissedStatusDelegate &sd)
void on_offered_incompatible_qos(dds_entity_t, org::eclipse::cyclonedds::core::OfferedIncompatibleQosStatusDelegate &sd)
void on_liveliness_lost(dds_entity_t, org::eclipse::cyclonedds::core::LivelinessLostStatusDelegate &sd)
void on_publication_matched(dds_entity_t, org::eclipse::cyclonedds::core::PublicationMatchedStatusDelegate &sd)

Private Members

dds::pub::Publisher pub_
dds::topic::Topic<T> topic_
template<typename T>
class dds::pub::DataWriterListener
#include <DataWriterListener.hpp>

DataWriter events Listener.

*Since a DataWriter is an Entity, it has the ability to have a Listener associated with it. In this case, the associated Listener should be of type DataWriterListener. This interface must be implemented by the application. A user-defined class must be provided by the application which must extend from the DataWriterListener class.

The DataWriterListener provides a generic mechanism (actually a callback function) for the Data Distribution Service to notify the application of relevant asynchronous status change events, such as a missed deadline, violation of a QosPolicy setting, etc. The DataWriterListener is related to changes in communication status StatusConditions.

// Application example listener
class ExampleListener :
               public virtual dds::pub::DataWriterListener<Foo::Bar>
{
public:
    virtual void on_offered_deadline_missed (
        dds::pub::DataWriter<Foo::Bar>& writer,
        const dds::core::status::OfferedDeadlineMissedStatus& status)
    {
        std::cout << "on_offered_deadline_missed" << std::endl;
    }

    virtual void on_offered_incompatible_qos (
        dds::pub::DataWriter<Foo::Bar>& writer,
        const dds::core::status::OfferedIncompatibleQosStatus& status)
    {
        std::cout << "on_offered_incompatible_qos" << std::endl;
    }

    virtual void on_liveliness_lost (
        dds::pub::DataWriter<Foo::Bar>& writer,
        const dds::core::status::LivelinessLostStatus& status)
    {
        std::cout << "on_liveliness_lost" << std::endl;
    }

    virtual void on_publication_matched (
        dds::pub::DataWriter<Foo::Bar>& writer,
        const dds::core::status::PublicationMatchedStatus& status)
    {
        std::cout << "on_publication_matched" << std::endl;
    }
};

// Create DataWriter with the listener
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::pub::Publisher publisher(participant);
dds::pub::DataWriter<Foo::Bar> writer(publisher,
                                      topic,
                                      publisher.default_datawriter_qos(),
                                      new ExampleListener(),
                                      dds::core::status::StatusMask::all());

See

for more information: Data Writer

See

for more information: Listener information

Subclassed by dds::pub::NoOpDataWriterListener< T >

Public Functions

virtual void on_offered_deadline_missed(dds::pub::DataWriter<T> &writer, const dds::core::status::OfferedDeadlineMissedStatus &status) = 0

This operation is called by the Data Distribution Service when the OfferedDeadlineMissedStatus changes.

This operation will only be called when the relevant DataWriterListener is installed and enabled for the offered deadline missed status (StatusMask::offered_deadline_missed()). The offered deadline missed status will change when the deadline that the DataWriter has committed through its DeadlineQosPolicy was not respected for a specific instance.

Parameters
  • writer – contain a pointer to the DataWriter on which the OfferedDeadlineMissedStatus has changed (this is an input to the application)

  • status – contain the OfferedDeadlineMissedStatus object (this is an input to the application).

virtual void on_offered_incompatible_qos(dds::pub::DataWriter<T> &writer, const dds::core::status::OfferedIncompatibleQosStatus &status) = 0

This operation called by the Data Distribution Service when the OfferedIncompatibleQosStatus changes.

This operation will only be called when the relevant DataWriterListener is installed and enabled for the StatusMask::offered_incompatible_qos(). The incompatible Qos status will change when a DataReader object has been discovered by the DataWriter with the same Topic and a requested DataReaderQos that was incompatible with the one offered by the DataWriter.

Parameters
  • writer – contain a pointer to the DataWriter on which the OfferedIncompatibleQosStatus has changed (this is an input to the application).

  • status – contain the OfferedIncompatibleQosStatus object (this is an input to the application).

virtual void on_liveliness_lost(dds::pub::DataWriter<T> &writer, const dds::core::status::LivelinessLostStatus &status) = 0

This operation is called by the Data Distribution Service when the LivelinessLostStatus changes.

This operation will only be called when the relevant DataWriterListener is installed and enabled for the liveliness lost status (StatusMask::liveliness_lost()). The liveliness lost status will change when the liveliness that the DataWriter has committed through its LivelinessQosPolicy was not respected. In other words, the DataWriter failed to actively signal its liveliness within the offered liveliness period. As a result, the DataReader objects will consider the DataWriter as no longer “alive”.

Parameters
  • writer – contains a pointer to the DataWriter on which the LivelinessLostStatus has changed (this is an input to the application).

  • status – contains the LivelinessLostStatus object (this is an input to the application).

virtual void on_publication_matched(dds::pub::DataWriter<T> &writer, const dds::core::status::PublicationMatchedStatus &status) = 0

This operation is called by the Data Distribution Service when a new match has been discovered for the current publication, or when an existing match has ceased to exist.

Usually this means that a new DataReader that matches the Topic and that has compatible Qos as the current DataWriter has either been discovered, or that a previously discovered DataReader has ceased to be matched to the current DataWriter. A DataReader may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current DataWriter or when either the DataWriter or the DataReader has chosen to put its matching counterpart on its ignore-list using the dds::sub::ignore or dds::pub::ignore operations.

it will only be called when the relevant DataWriterListener is installed and enabled for the StatusMask::publication_matched().

Parameters
  • writer – contains a pointer to the DataWriter for which a match has been discovered (this is an input to the application provided by the Data Distribution Service).

  • status – contains the PublicationMatchedStatus object (this is an input to the application provided by the Data Distribution Service).

class dds::pub::qos::DataWriterQos : public dds::core::EntityQos<org::eclipse::cyclonedds::pub::qos::DataWriterQosDelegate>
#include <DataWriterQos.hpp>

This object provides the basic mechanism for an application to specify Quality of Service attributes for a DataWriter.

A QosPolicy can be set when the DataWriter is created or modified with the set qos operation. Both operations take the DataWriterQos object as a parameter. There may be cases where several policies are in conflict. Consistency checking is performed each time the policies are modified when they are being created and, in case they are already enabled, via the set qos operation.

Attributes

QosPolicy

Desciption

Default Value

dds::core::policy::UserData

Additional information (info)

UserData::UserData(empty)

dds::core::policy::Durability

Data storage settings for late joiners (info)

Durability::Volatile()

dds::core::policy::Deadline

Period in which new sample is written (info)

Deadline::Deadline(infinite)

dds::core::policy::LatencyBudget

Used for optimization (info)

LatencyBudget::LatencyBudget(zero)

dds::core::policy::Liveliness

Liveliness assertion mechanism (info)

Liveliness::Automatic()

dds::core::policy::Reliability

Reliability settings (info)

Reliability::Reliable()

dds::core::policy::DestinationOrder

DataReader data order settings (info)

DestinationOrder::ReceptionTimestamp()

dds::core::policy::History

Data storage settings (info)

History::KeepLast(depth 1)

dds::core::policy::ResourceLimits

Maximum resource settings (info)

ResourceLimits::ResourceLimits(all unlimited)

dds::core::policy::TransportPriority

Priority hint for transport layer (info)

TransportPriority::TransportPriority(0)

dds::core::policy::Lifespan

Maximum duration of validity of data (info)

Lifespan::Lifespan(infinite)

dds::core::policy::Ownership

Exclusive ownership or not (info)

Ownership::Shared()

dds::core::policy::OwnershipStrength

Ownership strenght (info)

OwnershipStrength::OwnershipStrength(0)

dds::core::policy::WriterDataLifecycle

Dispose with unregister or not (info)

WriterDataLifecycle::AutoDisposeUnregisteredInstances()

Some QosPolicy have “immutable” semantics meaning that they can only be specified either at DataWriter creation time or prior to calling the enable operation on the DataWriter.

See

for more information: DCPS_QoS

Public Functions

inline DataWriterQos()

Create default QoS.

DataWriterQos(const DataWriterQos &qos)

Create copied QoS type.

Parameters

qos – the QoS to copy policies from.

DataWriterQos(const dds::topic::qos::TopicQos &qos)

Create a DataWriter QoS from a TopicQos.

This operation will copy the QosPolicy settings from the TopicQos to the corresponding QosPolicy settings in the DataWriterQos. The related value in DataWriterQos will be repliced, while the other policies will get the default QoS policies.

This is a “convenience” operation. It can be used to merge default DataWriter QosPolicy settings with the corresponding ones on the Topic. The resulting DataWriterQos can then be used to create a new DataWriter, or set its DataWriterQos.

dds::topic::qos::TopicQos topicQos = topic.qos();
dds::pub::qos::DataWriterQos writerQos(topicQos);
// Policies of the DataWriterQos that are not present in the TopicQos
// have the default value.

This operation does not check the resulting DataWriterQos for self consistency. This is because the “merged” DataWriterQos may not be the final one, as the application can still modify some QosPolicy settings prior to applying the DataWriterQos to the DataWriter.

Parameters

qos – the QoS to copy policies from.

DataWriterQos &operator=(const dds::topic::qos::TopicQos &other)

Assign dds::topic::qos::TopicQos policies to the DataWriterQos.

This operation will copy the QosPolicy settings from the TopicQos to the corresponding QosPolicy settings in the DataWriterQos (replacing the values, if present).

This is a “convenience” operation, useful in combination with the operations Publisher::default_datawriter_qos() and dds::topic::Topic::qos(). This operation can be used to merge the DataWriter QosPolicy settings with the corresponding ones on the Topic. The resulting DataWriterQos can then be used to create a new DataWriter, or set its DataWriterQos.

dds::topic::qos::TopicQos topicQos = topic.qos();
dds::pub::qos::DataWriterQos writerQos = publisher.default_datawriter_qos();
writerQos = topicQos;
// Policies of the DataWriterQos that are not present in the TopicQos are untouched.

This operation does not check the resulting DataWriterQos for self consistency. This is because the “merged” DataWriterQos may not be the final one, as the application can still modify some QosPolicy settings prior to applying the DataWriterQos to the DataWriter.

Parameters

qos – the QoS to copy policies from.

class org::eclipse::cyclonedds::pub::qos::DataWriterQosDelegate

Public Functions

DataWriterQosDelegate()
DataWriterQosDelegate(const org::eclipse::cyclonedds::topic::qos::TopicQosDelegate &tqos)
void policy(const dds::core::policy::UserData &user_data)
void policy(const dds::core::policy::Durability &durability)
void policy(const dds::core::policy::Deadline &deadline)
void policy(const dds::core::policy::LatencyBudget &budget)
void policy(const dds::core::policy::Liveliness &liveliness)
void policy(const dds::core::policy::Reliability &reliability)
void policy(const dds::core::policy::DestinationOrder &order)
void policy(const dds::core::policy::History &history)
void policy(const dds::core::policy::ResourceLimits &resources)
void policy(const dds::core::policy::TransportPriority &priority)
void policy(const dds::core::policy::Lifespan &lifespan)
void policy(const dds::core::policy::Ownership &ownership)
void policy(const dds::core::policy::WriterDataLifecycle &lifecycle)
template<typename POLICY>
const POLICY &policy() const
template<typename POLICY>
POLICY &policy()
dds_qos_t *ddsc_qos() const
void ddsc_qos(const dds_qos_t *qos)
void named_qos(const struct _DDS_NamedDataWriterQos &qos)
void check() const
bool operator==(const DataWriterQosDelegate &other) const
DataWriterQosDelegate &operator=(const org::eclipse::cyclonedds::topic::qos::TopicQosDelegate &tqos)
template<>
inline dds::core::policy::UserData &policy()
template<>
inline dds::core::policy::Durability &policy()
template<>
inline dds::core::policy::Deadline &policy()
template<>
inline dds::core::policy::LatencyBudget &policy()
template<>
inline dds::core::policy::Liveliness &policy()
template<>
inline dds::core::policy::Reliability &policy()
template<>
inline dds::core::policy::DestinationOrder &policy()
template<>
inline dds::core::policy::History &policy()
template<>
inline dds::core::policy::ResourceLimits &policy()
template<>
inline dds::core::policy::TransportPriority &policy()
template<>
inline dds::core::policy::Lifespan &policy()
template<>
inline dds::core::policy::Ownership &policy()
template<>
inline dds::core::policy::WriterDataLifecycle &policy()

Private Members

dds::core::policy::UserData user_data_
dds::core::policy::Durability durability_
dds::core::policy::Deadline deadline_
dds::core::policy::LatencyBudget budget_
dds::core::policy::Liveliness liveliness_
dds::core::policy::Reliability reliability_
dds::core::policy::DestinationOrder order_
dds::core::policy::History history_
dds::core::policy::ResourceLimits resources_
dds::core::policy::TransportPriority priority_
dds::core::policy::Lifespan lifespan_
dds::core::policy::Ownership ownership_
dds::core::policy::WriterDataLifecycle lifecycle_
class org::eclipse::cyclonedds::core::DDScObjectDelegate : public virtual org::eclipse::cyclonedds::core::ObjectDelegate

Subclassed by org::eclipse::cyclonedds::core::cond::ConditionDelegate, org::eclipse::cyclonedds::core::cond::WaitSetDelegate, org::eclipse::cyclonedds::core::EntityDelegate, org::eclipse::cyclonedds::sub::QueryDelegate, org::eclipse::cyclonedds::topic::TopicDescriptionDelegate

Public Types

typedef std::unordered_map<dds_entity_t, org::eclipse::cyclonedds::core::ObjectDelegate::weak_ref_type> entity_map_type

Public Functions

DDScObjectDelegate()
virtual ~DDScObjectDelegate()
virtual void close()
dds_entity_t get_ddsc_entity()
void set_ddsc_entity(dds_entity_t e)
void add_to_entity_map(org::eclipse::cyclonedds::core::ObjectDelegate::weak_ref_type weak_ref)

Public Static Functions

static ObjectDelegate::ref_type extract_strong_ref(dds_entity_t e)

Protected Attributes

dds_entity_t ddsc_entity

Private Functions

void delete_from_entity_map()

Private Static Attributes

static org::eclipse::cyclonedds::core::DDScObjectDelegate::entity_map_type entity_map
static Mutex entity_map_mutex
template<typename T>
class ddscxx_serdata : public ddsi_serdata

Public Functions

ddscxx_serdata(const ddsi_sertype *type, ddsi_serdata_kind kind)
inline ~ddscxx_serdata()
void resize(size_t requested_size)
inline size_t size() const
inline void *data() const
inline ddsi_keyhash_t &key()
inline const ddsi_keyhash_t &key() const
inline bool &key_md5_hashed()
inline const bool &key_md5_hashed() const
void populate_hash()
inline T *setT(const T *toset)
inline T *getT()

Public Members

bool hash_populated = false

Private Functions

inline void deserialize_and_update_sample(uint8_t *buffer, T *&t)
inline void update_sample_from_iox_chunk(T *&t)

Private Members

size_t m_size = {0}
std::unique_ptr<unsigned char[]> m_data = {nullptr}
ddsi_keyhash_t m_key
bool m_key_md5_hashed = false
std::atomic<T*> m_t = {nullptr}
template<typename T>
class ddscxx_sertype : public ddsi_sertype

Public Functions

ddscxx_sertype()

Public Static Attributes

static const ddsi_sertype_ops ddscxx_sertype_ops = {ddsi_sertype_v0, nullptr, sertype_free<T>, sertype_zero_samples<T>, sertype_realloc_samples<T>, sertype_free_samples<T>, sertype_equal<T>, sertype_hash<T>, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, sertype_get_serialized_size<T>, sertype_serialize_into<T>}
class dds::core::policy::Deadline : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit Deadline(const dds::core::Duration &period = dds::core::Duration::infinite())

Creates a Deadline QoS instance

Parameters

period – deadline period

Deadline(const Deadline &other)

Copies a Deadline QoS instance

Parameters

other – the Deadline QoS instance to copy

Deadline &operator=(const Deadline &other) = default

Copies a Deadline QoS instance

Parameters

other – the Deadline QoS instance to copy

Returns

reference to the Deadline QoS instance that was copied to

Deadline &period(const dds::core::Duration &period)

Sets the deadline period

Parameters

period – deadline period

const dds::core::Duration period() const

Gets the deadline period

Returns

deadline period

class org::eclipse::cyclonedds::core::policy::DeadlineDelegate

Public Functions

DeadlineDelegate(const DeadlineDelegate &other)
explicit DeadlineDelegate(const dds::core::Duration &d)
DeadlineDelegate &operator=(const DeadlineDelegate &other) = default
void period(const dds::core::Duration &d)
dds::core::Duration period() const
bool operator==(const DeadlineDelegate &other) const
void check() const
void check_against(const org::eclipse::cyclonedds::core::policy::TimeBasedFilterDelegate &filter) const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::Duration period_
class dds::core::policy::DestinationOrder : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit DestinationOrder(dds::core::policy::DestinationOrderKind::Type kind = dds::core::policy::DestinationOrderKind::BY_RECEPTION_TIMESTAMP)

Creates a DestinationOrder QoS instance

Parameters

kind – the kind

DestinationOrder(const DestinationOrder &other)

Copies a DestinationOrder QoS instance

Parameters

other – the DestinationOrder QoS instance to copy

DestinationOrder &operator=(const DestinationOrder &other) = default

Copies a DestinationOrder QoS instance

Parameters

other – the DestinationOrder QoS instance to copy

Returns

reference to the DestinationOrder QoS that was copied to

DestinationOrder &kind(dds::core::policy::DestinationOrderKind::Type kind)

Sets the kind

Parameters

kind – the kind

dds::core::policy::DestinationOrderKind::Type kind() const

Gets the kind

Returns

the kind

Public Static Functions

static DestinationOrder SourceTimestamp()
Returns

a DestinationOrder QoS instance with the kind set to BY_SOURCE_TIMESTAMP

static DestinationOrder ReceptionTimestamp()
Returns

a DestinationOrder QoS instance with the kind set to BY_RECEPTION_TIMESTAMP

class org::eclipse::cyclonedds::core::policy::DestinationOrderDelegate

Public Functions

DestinationOrderDelegate(const DestinationOrderDelegate &other)
explicit DestinationOrderDelegate(dds::core::policy::DestinationOrderKind::Type kind)
DestinationOrderDelegate &operator=(const DestinationOrderDelegate &other) = default
void kind(dds::core::policy::DestinationOrderKind::Type kind)
dds::core::policy::DestinationOrderKind::Type kind() const
bool operator==(const DestinationOrderDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::policy::DestinationOrderKind::Type kind_
struct dds::core::policy::DestinationOrderKind

Public Types

enum Type

Values:

enumerator BY_RECEPTION_TIMESTAMP

The order is based on the timestamp, at the moment the sample was received by the DataReader.

enumerator BY_SOURCE_TIMESTAMP

The order is based on the timestamp, which was set by the DataWriter. This means that the system needs some time synchronization.

class dds::domain::DomainParticipant : public dds::core::Entity
#include <DomainParticipant.hpp>

A DomainParticipant represents the local membership of the application in a Domain.

The DomainParticipant represents the participation of the application on a communication plane that isolates applications running on the same set of physical computers from each other. A domain establishes a virtual network linking all applications that share the same domainId and isolating them from applications running on different domains. In this way, several independent distributed applications can coexist in the same physical network without interfering, or even being aware of each other.

See

for more information: Domain Participant

Public Types

typedef dds::domain::DomainParticipantListener Listener

Local representation of the dds::domain::DomainParticipantListener

Public Functions

DomainParticipant(uint32_t id)

Creates a new DomainParticipant object. The DomainParticipant signifies that the calling application intends to join the Domain identified by the domain_id argument.

The DomainParticipant will be created with the QoS values specified on the last successful call to DomainParticipant::default_publisher_qos(qos) or, if the call was never made, the default values.

Parameters

id – the id of the domain joined by the new DomainParticipant

Throws
DomainParticipant(uint32_t id, const dds::domain::qos::DomainParticipantQos &qos, dds::domain::DomainParticipantListener *listener = NULL, const dds::core::status::StatusMask &event_mask = dds::core::status::StatusMask::none(), const std::string &config = std::string())

Creates a new DomainParticipant object. The DomainParticipant signifies that the calling application intends to join the Domain identified by the domain_id argument.

The DomainParticipant will be created with the DomainParticipantQos passed as an argument.

It is possible to provide a specific configuration. Please be aware that the given domain_id always takes precedence over the configuration. Also, if a domain with the same ID was created previously (either through the config argument, environment var or default), that configuration is used.

| id | config | in config | previous | result | +-+—–+——–+——-+—————————-+ | n | no | n.a. | no | n, environment/default config | | n | no | n.a. | yes | n, previous config | | n | yes | no | no | n, default config (with n id) | | n | yes | yes/any | no | n, given config | | n | yes | no | yes | n, previous config | | n | yes | yes/any | yes | n, previous config |

Parameters
  • id – the id of the domain joined by the new DomainParticipant

  • qos – the QoS settings for the new DomainParticipant

  • listener – the listener

  • event_mask – the mask defining the events for which the listener will be notified.

  • config – when not empty, the value is used as either the name of the file containing the configuration or, when it starts with ‘<’, taken to be the XML representation of the configuration. When not empty, the id argument of this constructor has to have a specific value and can not be org::eclipse::cyclonedds::domain::default_id().

Throws
DomainParticipant(uint32_t id, const dds::domain::qos::DomainParticipantQos &qos, dds::domain::DomainParticipantListener *listener, const dds::core::status::StatusMask &event_mask, const ddsi_config &config)
void listener(Listener *listener, const ::dds::core::status::StatusMask &event_mask)

Register a listener with the DomainParticipant.

The notifications received by the listener depend on the status mask with which it was registered.

Listener un-registration is performed by setting the listener to NULL.

See also listener information.

Parameters
  • listener – the listener

  • event_mask – the mask defining the events for which the listener will be notified.

Throws
Listener *listener() const

Get the listener of this DomainParticipant.

See also listener information.

Throws

dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

Returns

the listener

const dds::domain::qos::DomainParticipantQos &qos() const

Gets the DomainParticipantQos setting for this instance.

Throws
Returns

the qos

void qos(const dds::domain::qos::DomainParticipantQos &qos)

Sets the DomainParticipantQos setting for this instance.

Parameters

qos – the qos

Throws
uint32_t domain_id() const

This operation retrieves the domain_id used to create the DomainParticipant. The domain_id identifies the DDS domain to which the DomainParticipant belongs.

Each DDS domain represents a separate data communication plane isolated from other domains.

Throws
Returns

the domain id

void assert_liveliness()

This operation will manually assert the liveliness for the DomainParticipant.

This way, the Data Distribution Service is informed that the DomainParticipant is still alive. This operation only needs to be used when the DomainParticipant contains DataWriters with the dds:core::policy::LivelinessQosPolicy::ManualByParticipant(), and it will only affect the liveliness of those DataWriters.

Writing data via the write operation of a DataWriter will assert the liveliness on the DataWriter itself and its DomainParticipant. Therefore, assert_liveliness is only needed when not writing regularly. The liveliness should be asserted by the application, depending on the LivelinessQosPolicy.

Throws
bool contains_entity(const ::dds::core::InstanceHandle &handle)

This operation checks whether or not the given handle represents an Entity that was created by using this DomainParticipant.

The containment applies recursively. That is, it applies both to entities (TopicDescription, Publisher, or Subscriber) created directly using the DomainParticipant as well as entities created using a contained Publisher, or Subscriber as the factory, and so forth.

Parameters

handle – the instance handle for which the containement relationship has to be checked

Throws
Returns

true if the handle belongs to an Entity belonging to this DomainParticipant

dds::core::Time current_time() const

This operation returns the current value of the time that the service uses to time-stamp data writes and to set the reception timestamp for the data updates it receives.

Throws
Returns

the current time

DomainParticipant &operator<<(const dds::domain::qos::DomainParticipantQos &qos)

Sets the DomainParticipantQos setting for this instance.

Parameters

qos – the qos

Throws
const DomainParticipant &operator>>(dds::domain::qos::DomainParticipantQos &qos) const

Gets the DomainParticipantQos setting for this instance.

Throws
Returns

the qos

dds::pub::qos::PublisherQos default_publisher_qos() const

Gets the default PublisherQos of the DomainParticipant.

This operation gets an object with the default Publisher QosPolicy settings of the DomainParticipant (that is the PublisherQos) which is used for newly created Publisher objects, in case no QoS was provided during the creation.

The values retrieved by this operation match the set of values specified on the last successful call to dds::domain::DomainParticipant::default_publisher_qos(const ::dds::pub::qos::PublisherQos& qos), or, if the call was never made, the default values.

Throws
Returns

the default PublisherQos

DomainParticipant &default_publisher_qos(const ::dds::pub::qos::PublisherQos &qos)

Sets the default PublisherQos of the DomainParticipant.

This operation sets the default PublisherQos of the DomainParticipant which is used for newly created Publisher objects, when no QoS is provided.

The PublisherQos is always self consistent, because its policies do not depend on each other. This means that this operation never throws dds::core::InconsistentPolicyError.

The values set by this operation are returned by dds::domain::DomainParticipant::default_publisher_qos().

Parameters

qos – the default PublisherQos

Throws
dds::sub::qos::SubscriberQos default_subscriber_qos() const

Gets the default SubscriberQos of the DomainParticipant.

This operation gets an object with the default Subscriber QosPolicy settings of the DomainParticipant (that is the SubscriberQos) which is used for newly created Subscriber objects, in case no QoS was provided during the creation.

The values retrieved by this operation match the set of values specified on the last successful call to dds::domain::DomainParticipant::default_subscriber_qos(const :dds::sub::qos::SubscriberQos& qos), or, if the call was never made, the default values.

Throws
Returns

the default SubscriberQos

DomainParticipant &default_subscriber_qos(const ::dds::sub::qos::SubscriberQos &qos)

Sets the default SubscriberQos of the DomainParticipant.

This operation sets the default SubscriberQos of the DomainParticipant which is used for newly created Subscriber objects, when no QoS is provided.

The SubscriberQos is always self consistent, because its policies do not depend on each other. This means that this operation never throws dds::core::InconsistentPolicyError.

The values set by this operation are returned by dds::domain::DomainParticipant::default_subscriber_qos().

Parameters

qos – the default SubscriberQos

Throws
dds::topic::qos::TopicQos default_topic_qos() const

Gets the default TopicQos of the DomainParticipant.

This operation gets an object with the default Topic QosPolicy settings of the DomainParticipant (that is the TopicQos) which is used for newly created Topic objects, in case no QoS was provided during the creation.

The values retrieved by this operation match the set of values specified on the last successful call to dds::domain::DomainParticipant::default_topic_qos(const dds::topic::qos::TopicQos& qos), or, if the call was never made, the default values.

Throws
Returns

the default TopicQos

DomainParticipant &default_topic_qos(const dds::topic::qos::TopicQos &qos)

Sets the default TopicQos of the DomainParticipant.

This operation sets the default SubscriberQos of the DomainParticipant which is used for newly created Subscriber objects, when no QoS is provided.

This operation checks if the TopicQos is self consistent. If it is not, the operation has no effect and throws dds::core::InconsistentPolicyError.

The values set by this operation are returned by dds::domain::DomainParticipant::default_topic_qos().

Parameters

qos – the default TopicQos

Throws

Public Static Functions

static dds::domain::qos::DomainParticipantQos default_participant_qos()

Gets the default DomainParticipantQos.

This operation gets an object with the default global DomainParticipant QosPolicy settings which is used for newly created DomainParticipant objects, in case no QoS was provided during the creation.

The values retrieved by this operation match the set of values specified on the last successful call to dds::domain::DomainParticipant::default_participant_qos(const ::dds::domain::qos::DomainParticipantQos& qos), or, if the call was never made, the default values.

Throws
Returns

the default DomainParticipantQos

static void default_participant_qos(const ::dds::domain::qos::DomainParticipantQos &qos)

Sets the default DomainParticipantQos.

This QoS will be used by all following DomainParticipant creations when no QoS was given during those creations or the QoS is given that was returned by dds::domain::DomainParticipant::default_participant_qos().

Parameters

qos – the default DomainParticipantQos

Throws
class org::eclipse::cyclonedds::domain::DomainParticipantDelegate : public org::eclipse::cyclonedds::core::EntityDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<DomainParticipantDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<DomainParticipantDelegate>::weak_ref_type weak_ref_type

Public Functions

DomainParticipantDelegate(uint32_t id, const dds::domain::qos::DomainParticipantQos &qos, dds::domain::DomainParticipantListener *listener, const dds::core::status::StatusMask &mask, const std::string &config)
DomainParticipantDelegate(uint32_t id, const dds::domain::qos::DomainParticipantQos &qos, dds::domain::DomainParticipantListener *listener, const dds::core::status::StatusMask &mask, const ddsi_config &config)
virtual ~DomainParticipantDelegate()
void init(ObjectDelegate::weak_ref_type weak_ref)
void listener(dds::domain::DomainParticipantListener *listener, const ::dds::core::status::StatusMask &mask)
dds::domain::DomainParticipantListener *listener() const
const dds::domain::qos::DomainParticipantQos &qos() const
void qos(const dds::domain::qos::DomainParticipantQos &qos)
uint32_t domain_id()
void assert_liveliness()
bool contains_entity(const ::dds::core::InstanceHandle &handle)
virtual void close()
dds::core::Time current_time() const
dds::topic::qos::TopicQos default_topic_qos() const
void default_topic_qos(const dds::topic::qos::TopicQos &qos)
dds::pub::qos::PublisherQos default_publisher_qos() const
void default_publisher_qos(const ::dds::pub::qos::PublisherQos &qos)
dds::sub::qos::SubscriberQos default_subscriber_qos() const
void default_subscriber_qos(const ::dds::sub::qos::SubscriberQos &qos)
void add_publisher(org::eclipse::cyclonedds::core::EntityDelegate &publisher)
void remove_publisher(org::eclipse::cyclonedds::core::EntityDelegate &publisher)
void add_subscriber(org::eclipse::cyclonedds::core::EntityDelegate &subscriber)
void remove_subscriber(org::eclipse::cyclonedds::core::EntityDelegate &subscriber)
void add_topic(org::eclipse::cyclonedds::core::EntityDelegate &topic)
void remove_topic(org::eclipse::cyclonedds::core::EntityDelegate &topic)
void add_cfTopic(org::eclipse::cyclonedds::core::ObjectDelegate &cfTopic)
void remove_cfTopic(org::eclipse::cyclonedds::core::ObjectDelegate &cfTopic)
org::eclipse::cyclonedds::core::EntityDelegate::ref_type find_topic(const std::string &topic_name)
org::eclipse::cyclonedds::core::ObjectDelegate::ref_type find_cfTopic(const std::string &topic_name)
dds_entity_t lookup_topic(const std::string &topic_name, const dds::core::Duration &timeout)
void lookup_topics(const std::string &type_name, std::vector<dds_entity_t> &topics, uint32_t max_size)
dds::domain::DomainParticipant<DomainParticipantDelegate> wrapper()
bool is_auto_enable() const
void ignore_participant(const ::dds::core::InstanceHandle &handle)
virtual void listener_notify(ObjectDelegate::ref_type source, uint32_t triggerMask, void *eventData, void *listener)
org::eclipse::cyclonedds::core::EntityDelegate::ref_type builtin_subscriber()
void builtin_subscriber(const org::eclipse::cyclonedds::core::EntityDelegate::ref_type subscriber)
virtual void on_data_readers(dds_entity_t subscriber)
virtual void on_requested_deadline_missed(dds_entity_t reader, org::eclipse::cyclonedds::core::RequestedDeadlineMissedStatusDelegate &sd)
virtual void on_requested_incompatible_qos(dds_entity_t reader, org::eclipse::cyclonedds::core::RequestedIncompatibleQosStatusDelegate &sd)
virtual void on_sample_rejected(dds_entity_t reader, org::eclipse::cyclonedds::core::SampleRejectedStatusDelegate &sd)
virtual void on_liveliness_changed(dds_entity_t reader, org::eclipse::cyclonedds::core::LivelinessChangedStatusDelegate &sd)
virtual void on_data_available(dds_entity_t reader)
virtual void on_subscription_matched(dds_entity_t reader, org::eclipse::cyclonedds::core::SubscriptionMatchedStatusDelegate &sd)
virtual void on_sample_lost(dds_entity_t reader, org::eclipse::cyclonedds::core::SampleLostStatusDelegate &sd)

Public Static Functions

static dds::domain::qos::DomainParticipantQos default_participant_qos()
static void default_participant_qos(const ::dds::domain::qos::DomainParticipantQos &qos)
static void add_participant(org::eclipse::cyclonedds::core::EntityDelegate &participant)
static void remove_participant(org::eclipse::cyclonedds::core::EntityDelegate &participant)
static org::eclipse::cyclonedds::domain::DomainParticipantDelegate::ref_type lookup_participant(uint32_t domain_id)

Private Members

uint32_t domain_id_
dds::domain::qos::DomainParticipantQos qos_
dds::topic::qos::TopicQos default_topic_qos_
dds::pub::qos::PublisherQos default_pub_qos_
dds::sub::qos::SubscriberQos default_sub_qos_
org::eclipse::cyclonedds::core::EntitySet publishers
org::eclipse::cyclonedds::core::EntitySet subscribers
org::eclipse::cyclonedds::core::EntitySet topics
org::eclipse::cyclonedds::core::ObjectSet cfTopics
org::eclipse::cyclonedds::core::EntityDelegate::weak_ref_type builtin_subscriber_
org::eclipse::cyclonedds::domain::DomainWrap::ref_type domain_ref_

Private Static Attributes

static org::eclipse::cyclonedds::core::EntitySet participants
static dds::domain::qos::DomainParticipantQos default_participant_qos_
static org::eclipse::cyclonedds::core::Mutex global_participants_lock_
static org::eclipse::cyclonedds::domain::DomainWrap::map_ref_type domain_registry_
class DomainParticipantListener : public virtual dds::pub::PublisherListener, public virtual dds::sub::SubscriberListener, public virtual dds::topic::AnyTopicListener
#include <DomainParticipantListener.hpp>

DomainParticipant events Listener.

Since a DomainParticipant is an Entity, it has the ability to have a Listener associated with it. In this case, the associated Listener should be of type DomainParticipantListener. This interface must be implemented by the application. A user-defined class must be provided by the application which must extend from the DomainParticipantListener class.

The DomainParticipantListener provides a generic mechanism (actually a callback function) for the Data Distribution Service to notify the application of relevant asynchronous status change events, such as a missed deadline, violation of a QosPolicy setting, etc. The DomainParticipantListener is related to changes in communication status StatusConditions.

// Application example listener
class ExampleListener :
               public virtual dds::domain::DomainParticipantListener
{
public:
    virtual void on_inconsistent_topic (
        dds::topic::AnyTopic& topic,
        const dds::core::status::InconsistentTopicStatus& status)
    {
        std::cout << "on_inconsistent_topic" << std::endl;
    }

    virtual void on_offered_deadline_missed (
        dds::pub::AnyDataWriter& writer,
        const dds::core::status::OfferedDeadlineMissedStatus& status)
    {
        std::cout << "on_offered_deadline_missed" << std::endl;
    }

    virtual void on_offered_incompatible_qos (
        dds::pub::AnyDataWriter& writer,
        const dds::core::status::OfferedIncompatibleQosStatus& status)
    {
        std::cout << "on_offered_incompatible_qos" << std::endl;
    }

    virtual void on_liveliness_lost (
        dds::pub::AnyDataWriter& writer,
        const dds::core::status::LivelinessLostStatus& status)
    {
        std::cout << "on_liveliness_lost" << std::endl;
    }

    virtual void on_publication_matched (
        dds::pub::AnyDataWriter& writer,
        const dds::core::status::PublicationMatchedStatus& status)
    {
        std::cout << "on_publication_matched" << std::endl;
    }

    virtual void on_requested_deadline_missed (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::RequestedDeadlineMissedStatus & status)
    {
        std::cout << "on_requested_deadline_missed" << std::endl;
    }

    virtual void on_requested_incompatible_qos (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::RequestedIncompatibleQosStatus & status)
    {
        std::cout << "on_requested_incompatible_qos" << std::endl;
    }

    virtual void on_sample_rejected (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::SampleRejectedStatus & status)
    {
        std::cout << "on_sample_rejected" << std::endl;
    }

    virtual void on_liveliness_changed (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::LivelinessChangedStatus & status)
    {
        std::cout << "on_liveliness_changed" << std::endl;
    }

    virtual void on_data_available (
        dds::sub::AnyDataReader& reader)
    {
        std::cout << "on_data_available" << std::endl;
    }

    virtual void on_subscription_matched (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::SubscriptionMatchedStatus & status)
    {
        std::cout << "on_subscription_matched" << std::endl;
    }

    virtual void on_sample_lost (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::SampleLostStatus & status)
    {
        std::cout << "on_sample_lost" << std::endl;
    }

    virtual void on_data_on_readers (
        dds::sub::Subscriber& subs)
    {
        std::cout << "on_data_on_readers" << std::endl;
    }
};

// Create DomainParticipant with the listener
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id(),
                                           dds::domain::DomainParticipant::default_participant_qos(),
                                           new ExampleListener(),
                                           dds::core::status::StatusMask::all());

See

for more information: Domain Participant

See

for more information: Listener information

Subclassed by dds::domain::NoOpDomainParticipantListener, org::eclipse::cyclonedds::domain::DomainParticipantListener

class org::eclipse::cyclonedds::domain::DomainParticipantListener : public virtual dds::domain::DomainParticipantListener, public virtual org::eclipse::cyclonedds::topic::AnyTopicListener

Public Functions

inline virtual ~DomainParticipantListener()
class dds::domain::qos::DomainParticipantQos : public dds::core::EntityQos<org::eclipse::cyclonedds::domain::qos::DomainParticipantQosDelegate>
#include <DomainParticipantQos.hpp>

This class provides the basic mechanism for an application to specify Quality of Service attributes for a DomainParticipant.

A QosPolicy can be set when the DomainParticipant is created or modified with the set qos operations. Both operations take the DomainParticipantQos object as a parameter. There may be cases where several policies are in conflict. Consistency checking is performed each time the policies are modified when they are being created and, in case they are already enabled, via the set qos operation.

Attributes

QosPolicy

Desciption

Default Value

dds::core::policy::UserData

Additional information (info)

UserData::UserData(empty)

dds::core::policy::EntityFactory

Create enabled (info)

EntityFactory::AutoEnable()

Some QosPolicy have “immutable” semantics meaning that they can only be specified either at DomainParticipant creation time or prior to calling the enable operation on the DomainParticipant.

See

for more information: DCPS_QoS

Public Functions

inline DomainParticipantQos()

Create default QoS.

DomainParticipantQos(const DomainParticipantQos &qos)

Create QoS with policies copied from the given QoS.

Parameters

qos – the QoS to copy policies from.

class org::eclipse::cyclonedds::domain::qos::DomainParticipantQosDelegate

Public Functions

DomainParticipantQosDelegate()
DomainParticipantQosDelegate(const DomainParticipantQosDelegate &other)
~DomainParticipantQosDelegate()
void policy(const dds::core::policy::UserData &ud)
void policy(const dds::core::policy::EntityFactory &efp)
template<typename POLICY>
const POLICY &policy() const
template<typename POLICY>
POLICY &policy()
dds_qos_t *ddsc_qos() const
void ddsc_qos(const dds_qos_t *qos)
void named_qos(const struct _DDS_NamedDomainParticipantQos &qos)
void check() const
bool operator==(const DomainParticipantQosDelegate &other) const
DomainParticipantQosDelegate &operator=(const DomainParticipantQosDelegate &other)
template<>
inline dds::core::policy::UserData &policy()
template<>
inline dds::core::policy::EntityFactory &policy()

Private Members

dds::core::policy::UserData user_data_
dds::core::policy::EntityFactory entity_factory_
class org::eclipse::cyclonedds::domain::DomainParticipantRegistry

Public Static Functions

static void insert(dds::domain::DomainParticipant<org::eclipse::cyclonedds::domain::DomainParticipantDelegate> &participant)
static void remove(org::eclipse::cyclonedds::domain::DomainParticipantDelegate *delegate)
class org::eclipse::cyclonedds::domain::DomainWrap

Public Types

typedef ::dds::core::smart_ptr_traits<DomainWrap>::ref_type ref_type
typedef ::std::map<dds_domainid_t, ref_type> map_ref_type
typedef map_ref_type::iterator map_ref_iter

Public Functions

DomainWrap(dds_domainid_t id, const std::string &config)
DomainWrap(dds_domainid_t id, const ddsi_config &config)
~DomainWrap()

Private Members

dds_entity_t ddsc_domain
class dds::core::policy::Durability : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit Durability(dds::core::policy::DurabilityKind::Type kind = dds::core::policy::DurabilityKind::VOLATILE)

Creates a Durability QoS instance

Parameters

kind – the kind

Durability(const Durability &other)

Copies a Durability QoS instance

Parameters

other – the Durability QoS instance to copy

Durability &operator=(const Durability &other) = default

Copies a Durability QoS instance

Parameters

other – the Durability QoS instance to copy

Returns

reference to the Durability QoS that was copied to

Durability &kind(dds::core::policy::DurabilityKind::Type kind)

Set the kind

Parameters

kind – the kind to set

Returns

the kind that was set

dds::core::policy::DurabilityKind::Type kind() const

Get the kind

Returns

the kind

Public Static Functions

static Durability Volatile()
Returns

a Durability QoS instance with the kind set to VOLATILE

static Durability TransientLocal()
Returns

a Durability QoS instance with the kind set to TRANSIENT_LOCAL

static Durability Transient()
Returns

a Durability QoS instance with the kind set to TRANSIENT

static Durability Persistent()
Returns

a Durability QoS instance with the kind set to PERSISTENT

class org::eclipse::cyclonedds::core::policy::DurabilityDelegate

Public Functions

DurabilityDelegate(const DurabilityDelegate &other)
explicit DurabilityDelegate(dds::core::policy::DurabilityKind::Type kind)
DurabilityDelegate &operator=(const DurabilityDelegate &other) = default
void kind(dds::core::policy::DurabilityKind::Type kind)
dds::core::policy::DurabilityKind::Type kind() const
bool operator==(const DurabilityDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Public Members

dds::core::policy::DurabilityKind::Type kind_
struct dds::core::policy::DurabilityKind

Public Types

enum Type

Values:

enumerator VOLATILE

The samples are not available to late-joining DataReaders. In other words, only DataReaders, which were present at the time of the writing and have subscribed to this Topic, will receive the sample. When a DataReader subscribes afterwards (late-joining), it will only be able to read the next written sample. This setting is typically used for data, which is updated quickly.

enumerator TRANSIENT_LOCAL

Currently behaves identically to the TRANSIENT_DURABILITY_QOS, except for its RxO properties. The desired behaviour of TRANSIENT_LOCAL_DURABILITY_QOS can be achieved from the TRANSIENT_DURABILITY_QOS with the default (TRUE) setting of the autodispose_unregistered_instances flag on the DataWriter and the service_cleanup_delay set to 0 on the durability service. This is because for TRANSIENT_LOCAL, the data should only remain available for late-joining readers during the lifetime of its source writer, so it is not required to survive after its source writer has been deleted. Since the deletion of a writer implicitly unregisters all its instances, an autodispose_unregistered_instances value of TRUE will also dispose the affected data from the durability store, and thus prevent it from remaining available to late joining readers.

class dds::core::Duration
#include <Duration.hpp>

Duration represents a time interval and can -

  • Can be incremented by durations expressed as seconds, nanoseconds milliseconds, or Duration objects.

  • Can be converted to and from Durations expressed in milliseconds (or other units) as integer types.

Public Functions

Duration()

Create a Duration elapsing the default amount of time (zero seconds).

explicit Duration(int32_t sec, uint32_t nanosec = 0)

Create a Duration elapsing a specific amount of time.

Parameters
  • sec – Amount of seconds for the Duration.

  • nanosec – Amount of nanoseconds for the Duration.

int64_t sec() const

Get seconds part of the Duration.

Returns

number of seconds

void sec(int64_t s)

Set number of seconds

Parameters

s – number of seconds

uint32_t nanosec() const

Get nanoseconds part of the Duration.

Returns

number of nanoseconds

void nanosec(uint32_t ns)

Set number of nanoseconds

Parameters

ns – number of nanoseconds

int compare(const Duration &that) const

Returns an integer value for a comparison of two Durations: 1 if this Duration is greater than the comparator (that) -1 if the Duration is less than the comparator (that) 0 if the Duration matches the comparator (that)

Parameters

thatDuration to compare

Returns

comparison result

bool operator>(const Duration &that) const

Returns true if the Duration is greater than the comparator

Parameters

thatDuration to compare

Returns

comparison result

bool operator>=(const Duration &that) const

Returns true if the Duration is greater than or equal to the comparator

Parameters

that – the Duration to compare

Returns

true if that is larger than or equal to this

bool operator!=(const Duration &that) const

Returns true if the Duration is not equal to the comparator

Parameters

thatDuration to compare

Returns

comparison result

bool operator==(const Duration &that) const

Returns true if the Duration is equal to the comparator

Parameters

thatDuration to compare

Returns

comparison result

bool operator<=(const Duration &that) const

Returns true if the Duration is less than or equal to the comparator

Parameters

thatDuration to compare

Returns

comparison result

bool operator<(const Duration &that) const

Returns true if the Duration is less than the comparator

Parameters

thatDuration to compare

Returns

comparison result

Duration &operator+=(const Duration &a_ti)

Add a Duration to this Duration

Parameters

a_tiDuration to add

Returns

this Duration + a_ti

Duration &operator-=(const Duration &a_ti)

Subtract a Duration from this Duration

Parameters

a_tiDuration to subtract

Returns

this Duration - a_ti

Duration &operator*=(uint64_t factor)

Multiply this Duration by a factor

Parameters

factor – the factor to multiply this Duration by

Returns

this Duration * factor

const Duration operator+(const Duration &other) const

Add a Duration to Duration

Parameters

other – a Duration

Returns

Duration + other

const Duration operator-(const Duration &other) const

Subtract a Duration from Duration

Parameters

other – a Duration

Returns

the Duration - other

int64_t to_millisecs() const

Returns this Duration in milliseconds.

Returns

the duration in milliseconds

int64_t to_microsecs() const

Returns this Duration in micro-seconds.

Returns

the duration in micro-seconds

double to_secs() const

Returns this Duration in seconds.

Returns

the duration in seconds

Public Static Functions

static const Duration zero()

Create a Duration elapsing zero seconds.

static const Duration infinite()

Create an infinite Duration.

static const Duration from_microsecs(int64_t microseconds)

Create a Duration from a number of microseconds

Parameters

microseconds – number of microseconds

static const Duration from_millisecs(int64_t milliseconds)

Create a Duration from a number of milliseconds

Parameters

milliseconds – number of milliseconds

static const Duration from_secs(double seconds)

Create a Duration from a number of seconds

Parameters

seconds – number of seconds

Private Members

int32_t sec_
uint32_t nsec_
template<typename T>
struct dds::core::xtypes::dynamic_type_traits

Public Static Attributes

static const TypeKind TYPE_ID = TypeKind::NO_TYPE
static const std::string NAME
template<>
struct dds::core::xtypes::dynamic_type_traits<int16_t>

Public Static Attributes

static const TypeKind TYPE_ID = TypeKind::INT_16_TYPE
static const char *const NAME
template<>
struct dds::core::xtypes::dynamic_type_traits<int32_t>

Public Static Attributes

static const TypeKind TYPE_ID = TypeKind::INT_32_TYPE
static const char *const NAME
template<>
struct dds::core::xtypes::dynamic_type_traits<uint16_t>

Public Static Attributes

static const TypeKind TYPE_ID = TypeKind::UINT_16_TYPE
static const char *const NAME
template<>
struct dds::core::xtypes::dynamic_type_traits<uint32_t>

Public Static Attributes

static const TypeKind TYPE_ID = TypeKind::UINT_32_TYPE
static const char *const NAME
template<>
struct dds::core::xtypes::dynamic_type_traits<uint8_t>

Public Static Attributes

static const TypeKind TYPE_ID = TypeKind::UINT_8_TYPE
static const char *const NAME
class dds::core::xtypes::DynamicData : private dds::core::Reference
#include <DynamicData.hpp>

This class is used to read/write data for DynamicTypes. It allows reading and writing of samples in a type-safe manner but without any compile-time knowledge of the type being read or written.

Public Functions

DynamicData(const DynamicType &type)
template<typename T>
void value(uint32_T mid, const T &v) const
template<typename T>
T value(const std::string &mid, const T &v) const
template<typename T>
T value(uint32_T mid) const
template<typename T>
T value(const std::string &mid) const
DynamicType type() const
MemberType member_type(uint32_t id) const
MemberType member_type(const std::string &name) const
uint32_t member_id(const std::string &name) const
class DynamicType
class dds::core::Entity : public virtual dds::core::Reference
#include <Entity.hpp>

This class is the abstract base class for all the DCPS objects.

This class is the abstract base class for all of the DCPS objects that support QoS policies a listener and a status condition:

In the ISO C++ PSM each DDS entity behaves like a polymorphic reference in that it automatically manages its resource and it can be safely assigned up and down the DDS Entity type hierarchy.

Subclassed by dds::domain::DomainParticipant, dds::pub::AnyDataWriter, dds::pub::Publisher, dds::sub::AnyDataReader, dds::sub::Subscriber, dds::topic::AnyTopic

Public Functions

void enable()

Enable entity.

This operation enables the Entity. Entity objects can be created either enabled or disabled. This is controlled by the value of the dds::core::policy::EntityFactory QoS policy on the corresponding factory for the Entity.

Enabled entities are immediately activated at creation time meaning all their immutable QoS settings can no longer be changed. Disabled Entities are not yet activated, so it is still possible to change there immutable QoS settings. However, once activated the immutable QoS settings can no longer be changed.

Creating disabled entities can make sense when the creator of the Entity does not yet know which QoS settings to apply, thus allowing another piece of code to set the QoS later on.

The default setting of dds::core::policy::EntityFactory is such that, by default, it is not necessary to explicitly call enable on newly- created entities.

The enable operation is idempotent. Calling enable on an already- enabled Entity does not raise exceptions and has no effect.

If an Entity has not yet been enabled, the only operations that can be invoked on it are: the ones to set, get or copy the QosPolicy settings, the ones that set (or get) the listener, the ones that get the StatusCondition, the get_status_changes operation (although the status of a disabled entity never changes), and the ‘factory’ operations that create, delete or lookup other Entities. Other operations will throw the exception dds::core::NotEnabledError.

Entities created from a factory that is disabled are created disabled regardless of the setting of the dds::core::policy::EntityFactory Qos policy. Calling enable on an Entity whose factory is not enabled will fail and throw an dds::core::PreconditionNotMetError exception.

If the dds::core::policy::EntityFactory QoS policy has autoenable_created_entities set to TRUE, the enable operation on the factory will automatically enable all entities created from the factory.

The Listeners associated with an entity are not called until the entity is enabled. Conditions associated with an entity that is not enabled are inactive; that is, they have a trigger_value==false (dds::core::cond::Condition and dds::core::cond::WaitSet).

eg.

dds::domain::qos::DomainParticipantQos dpq;
dpq << dds::core::policy::EntityFactory::ManuallyEnable();
...
dds::sub::DataReader<Foo::Bar> dr(dp, topic, drqos);
dr.enable();

Throws

dds::core::PreconditionNotMetError – Entities’ factory is not enabled.

const dds::core::status::StatusMask status_changes()

This operation returns a mask with the communication statuses in the Entity that are “triggered”.

This operation retrieves the list of communication statuses in the Entity that are triggered. That is the set of communication statuses whose value have changed since the last time the application called this operation. This operation shows whether a change has occurred even when the status seems unchanged because the status changed back to the original status.

When the Entity is first created or if the Entity is not enabled, all communication statuses are in the “un-triggered” state so the mask returned by the operation is empty.

The result value is a bit mask in which each bit shows which value has changed. The relevant bits represent one of the following statuses:

When the entity is first created, or if the entity is not enabled, all communication statuses are in the untriggered state so the list returned by the status_changes operation will be empty.

Each status bit is declared as a constant and can be used in an AND operation to check the status bit against the result of type StatusMask. Not all statuses are relevant to all Entity objects. See the respective Listener interfaces for each Entity for more information.

The list of statuses returned by the status_changes operation refers to the statuses that are triggered on the Entity itself, and does not include statuses that apply to contained entities.

Returns

dds::core::status::StatusMask a bit mask in which each bit shows which value has changed.

const dds::core::InstanceHandle instance_handle() const

This operation returns the InstanceHandle_t that represents the Entity.

The relevant state of some Entity objects are distributed using built-in topics. Each built-in topic sample represents the state of a specific Entity and has a unique instance_handle. This operation returns the instance_handle of the built-in topic sample that represents the specified Entity

.

Some Entities (

dds::pub::Publisher and dds::sub::Subscriber) do not have a corresponding built-in topic sample, but they still have an instance_handle that uniquely identifies the Entity. The instance_handles obtained this way can also be used to check whether a specific Entity is located in a specific DomainParticipant (dds::domain::DomainParticipant::contains_entity()).

Returns

dds::core::InstanceHandle Result value is the instance_handle of the built-in topic sample that represents the state of this Entity.

void close()

This function closes the entity and releases related resources.

Resource management for some reference types might involve relatively heavyweight operating- system resources — such as e.g., threads, mutexes, and network sockets — in addition to memory. These objects therefore provide a method close() that shall halt network communication (in the case of entities) and dispose of any appropriate operating-system resources.

Users of this PSM are recommended to call close on objects of all reference types once they are finished using them. In addition, implementations may automatically close objects that they deem to be no longer in use, subject to the following restrictions:

  • Any object to which the application has a direct reference is still in use.

  • Any object that has been explicitly retained is still in use

  • The creator of any object that is still in use is itself still in use.

void retain()

Retain the Entity, even when it goes out of scope.

This function indicates that references to this object may go out of scope but that the application expects to look it up again later. Therefore the Service must consider this object to be still in use and may not close it automatically.

class org::eclipse::cyclonedds::core::EntityDelegate : public virtual org::eclipse::cyclonedds::core::DDScObjectDelegate

Subclassed by org::eclipse::cyclonedds::domain::DomainParticipantDelegate, org::eclipse::cyclonedds::pub::AnyDataWriterDelegate, org::eclipse::cyclonedds::pub::PublisherDelegate, org::eclipse::cyclonedds::sub::AnyDataReaderDelegate, org::eclipse::cyclonedds::sub::SubscriberDelegate, org::eclipse::cyclonedds::topic::AnyTopicDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<EntityDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<EntityDelegate>::weak_ref_type weak_ref_type

Public Functions

EntityDelegate()
virtual ~EntityDelegate()
void enable()
::dds::core::status::StatusMask status_changes() const
::dds::core::InstanceHandle instance_handle() const
bool contains_entity(const ::dds::core::InstanceHandle &handle)
ObjectDelegate::ref_type get_statusCondition()
virtual void close()
virtual void retain()
void *listener_get() const
const dds::core::status::StatusMask get_listener_mask() const
bool obtain_callback_lock()
void release_callback_lock()
virtual void on_inconsistent_topic(dds_entity_t topic, org::eclipse::cyclonedds::core::InconsistentTopicStatusDelegate&)
virtual void on_offered_deadline_missed(dds_entity_t writer, org::eclipse::cyclonedds::core::OfferedDeadlineMissedStatusDelegate&)
virtual void on_offered_incompatible_qos(dds_entity_t writer, org::eclipse::cyclonedds::core::OfferedIncompatibleQosStatusDelegate&)
virtual void on_liveliness_lost(dds_entity_t writer, org::eclipse::cyclonedds::core::LivelinessLostStatusDelegate&)
virtual void on_publication_matched(dds_entity_t writer, org::eclipse::cyclonedds::core::PublicationMatchedStatusDelegate&)
virtual void on_requested_deadline_missed(dds_entity_t reader, org::eclipse::cyclonedds::core::RequestedDeadlineMissedStatusDelegate&)
virtual void on_requested_incompatible_qos(dds_entity_t reader, org::eclipse::cyclonedds::core::RequestedIncompatibleQosStatusDelegate&)
virtual void on_sample_rejected(dds_entity_t reader, org::eclipse::cyclonedds::core::SampleRejectedStatusDelegate&)
virtual void on_liveliness_changed(dds_entity_t reader, org::eclipse::cyclonedds::core::LivelinessChangedStatusDelegate&)
virtual void on_data_available(dds_entity_t reader)
virtual void on_subscription_matched(dds_entity_t reader, org::eclipse::cyclonedds::core::SubscriptionMatchedStatusDelegate&)
virtual void on_sample_lost(dds_entity_t reader, org::eclipse::cyclonedds::core::SampleLostStatusDelegate&)
virtual void on_data_readers(dds_entity_t subscriber)

Protected Functions

void listener_set(void *listener, const dds::core::status::StatusMask &mask)
void prevent_callbacks()

Protected Attributes

bool enabled_
dds::core::status::StatusMask listener_mask
long callback_count
dds_listener_t *listener_callbacks

Protected Static Attributes

static unsigned int entityID_

Private Members

void *listener
ObjectDelegate::weak_ref_type myStatusCondition
void *callback_mutex
void *callback_cond
class dds::core::policy::EntityFactory : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit EntityFactory(bool autoenable_created_entities = true)

Creates an EntityFactory QoS instance

Parameters

autoenable_created_entities – boolean indicating whether created Entities should be automatically enabled

EntityFactory(const EntityFactory &other)

Copies an EntityFactory QoS instance

Parameters

other – the EntityFactory QoS instance to copy

EntityFactory &operator=(const EntityFactory &other) = default

Copies an EntityFactory QoS instance

Parameters

other – the EntityFactory QoS instance to copy

Returns

Reference to the EntityFactory QoS instance that was copied to

EntityFactory &autoenable_created_entities(bool autoenable_created_entities)

Sets a boolean indicating whether created Entities should be automatically enabled

Parameters

autoenable_created_entities – boolean indicating whether created Entities should be automatically enabled

bool autoenable_created_entities() const

Gets a boolean indicating whether Entities should be automatically enabled

Returns

boolean indicating whether created Entities should be automatically enabled

Public Static Functions

static EntityFactory AutoEnable()
Returns

an EntityFactory QoS instance with autoenable_created_entities set to true

static EntityFactory ManuallyEnable()
Returns

an EntityFactory QoS instance with autoenable_created_entities set to false

class org::eclipse::cyclonedds::core::policy::EntityFactoryDelegate

Public Functions

EntityFactoryDelegate(const EntityFactoryDelegate &other)
explicit EntityFactoryDelegate(bool auto_enable)
void auto_enable(bool on)
bool auto_enable() const
bool operator==(const EntityFactoryDelegate &other) const
EntityFactoryDelegate &operator=(const EntityFactoryDelegate &other) = default
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

bool auto_enable_
class dds::core::EntityQos : public dds::core::Value
#include <EntityQos.hpp>

QoS Container.

Acts as a container for Qos policies allowing all the policies of an entity to be set and retrieved as a unit.

For more information see Infrastructure Module and Supported Quality of Service

Public Functions

EntityQos()

Create default QoS.

EntityQos(const EntityQos &other)

Create copied QoS.

Parameters

other – the QoS to copy.

EntityQos(EntityQos &&other)

Create moved QoS.

Parameters

other – the QoS to move.

EntityQos &operator=(const EntityQos &other) = default

Copy to this QoS.

Parameters

other – the QoS to copy.

Returns

reference to the Qos which was copied to.

EntityQos &operator=(EntityQos &&other) = default

Move to this QoS.

Parameters

other – the QoS to move.

Returns

reference to the Qos which was moved to.

template<typename T>
EntityQos(const EntityQos<T> &qos)

Create/copy QoS from different QoS type.

Parameters

qos – the QoS to copy policies from.

template<typename POLICY>
EntityQos &policy(const POLICY &p)

Generic function for setting a policy applicable to this QoS object. Available policies depend on the actual instantiation of the template class, which might be DomainParticipantQos, TopicQos, PublisherQos, etc.

Parameters

p – the policy to be set for this QoS instance.

template<typename POLICY>
const POLICY &policy() const

Generic function for obtaining the value of a specific policy belonging to this QoS instance.

Returns

policy

template<typename POLICY>
POLICY &policy()

Generic function for obtaining the value of a specific policy belonging to this QoS instance.

Returns

policy

template<typename POLICY>
EntityQos &operator<<(const POLICY &p)

Generic function for setting a policy applicable to this QoS object. Available policies depend on the actual instantiation of the template class, which might be DomainParticipantQos, TopicQos, PublisherQos, etc.

Parameters

p – the policy to be set for this QoS instance.

template<typename POLICY>
const EntityQos &operator>>(POLICY &p) const

Generic function for obtaining the value of a specific policy belonging to this QoS instance.

Returns

policy

template<typename T>
EntityQos &operator=(const EntityQos<T> &other)

Generic function for setting a policy applicable to this QoS object. Available policies depend on the actual instantiation of the template class, which might be DomainParticipantQos, TopicQos, PublisherQos, etc.

Parameters

other – the EntityQos to set

template<typename T, typename U>
class org::eclipse::cyclonedds::core::EntityRegistry

Public Functions

inline void insert(T key, U &val)
inline void remove(T key)
inline U get(T key)

Private Members

std::map<T, dds::core::WeakReference<U>> registry
org::eclipse::cyclonedds::core::Mutex mutex
class org::eclipse::cyclonedds::core::EntitySet

Public Types

typedef std::vector<org::eclipse::cyclonedds::core::ObjectDelegate::weak_ref_type>::iterator vectorIterator
typedef std::vector<org::eclipse::cyclonedds::core::ObjectDelegate::weak_ref_type> vector

Public Functions

void insert(org::eclipse::cyclonedds::core::EntityDelegate &entity)
void erase(org::eclipse::cyclonedds::core::EntityDelegate &entity)
bool contains(const dds::core::InstanceHandle &handle)
void all_close()
void all_retain()
void all_enable()
vector copy()

Private Members

WeakReferenceSet<ObjectDelegate::weak_ref_type>::wset entities
Mutex mutex
class Error : public dds::core::Exception, public logic_error
#include <Exception.hpp>

Exception: Generic, unspecified error.

class dds::core::Exception
#include <Exception.hpp>

Exception: base class for specified DDS Exceptions.

DDS PIM Return Code

DDS-PSM-CXX Exception Class

std C++ Parent Exception

RETCODE_OK

Normal return; no exception

N/A

RETCODE_NO_DATA

Normal return with informational state attached

N/A

RETCODE_ERROR

Error

std::logic_error

RETCODE_BAD_PARAMETER

InvalidArgumentError

std::invalid_argument

RETCODE_TIMEOUT

TimeoutError

std::runtime_error

RETCODE_UNSUPPORTED

UnsupportedError

std::logic_error

RETCODE_ALREADY_DELETED

AlreadyClosedError

std::logic_error

RETCODE_ILLEGAL_OPERATION

IllegalOperationError

std::logic_error

RETCODE_NOT_ENABLED

NotEnabledError

std::logic_error

RETCODE_PRECONDITION_NOT_MET

PreconditionNotMetError

std::logic_error

RETCODE_IMMUTABLE_POLICY

ImmutablePolicyError

std::logic_error

RETCODE_INCONSISTENT_POLICY

InconsistentPolicyError

std::logic_error

RETCODE_OUT_OF_RESOURCES

OutOfResourcesError

std::runtime_error

The DDS-PSM-Cxx maps error codes to C++ exceptions defined in the dds::core namespace and inheriting from a base Exception class and the appropriate standard C++ exception. Table 7.3 lists the mapping between error codes as defined in the DDS PIM and C++ exceptions as used in this specification. Exceptions have value semantics; this means that they must always have deep copy semantics. The full list of exceptions is included in the file dds/core/Exceptions.hpp.

Subclassed by dds::core::AlreadyClosedError, dds::core::Error, dds::core::IllegalOperationError, dds::core::ImmutablePolicyError, dds::core::InconsistentPolicyError, dds::core::InvalidArgumentError, dds::core::InvalidDataError, dds::core::InvalidDowncastError, dds::core::NotEnabledError, dds::core::NullReferenceError, dds::core::OutOfResourcesError, dds::core::PreconditionNotMetError, dds::core::TimeoutError, dds::core::UnsupportedError

Public Functions

virtual const char *what() const = 0

Retrieve information about the exception that was thrown.

Example

try {
    // Do something that will trigger a dds exception, like:
    dds::domain::DomainParticipant participant = dds::core::null;
    participant.domain_id();
} catch (const dds::core::Exception& e) {
    std::cout << e.what() << std::endl;
}
Exception information (of the NullReferenceError in this case)
Null reference: Reference[157] == dds::core::null
========================================================================================
Context     : dds::domain::DomainParticipant::domain_id
Date        : Wed Oct 21 19:28:00 CET 2015
Node        : DeLorean
Process     : flux_capacitor <15423>
Thread      : mr_fusion b6f25700
Internals   : ReferenceImpl.hpp/157/V6.6.0
----------------------------------------------------------------------------------------
Report      : Null reference: Reference[157] == dds::core::null
Internals   : dds::core::Reference::delegate/ReferenceImpl.hpp/157

Returns

Exception information

Protected Functions

Exception()
class dds::core::xtypes::ExtensibilityAnnotation : public dds::core::xtypes::Annotation

Public Functions

ExtensibilityAnnotation(ExtensibilityKind xkind)
ExtensibilityKind extensibility_kind() const
class ExtensibilityAnnotation : public dds::core::xtypes::detail::Annotation
struct dds::core::xtypes::ExtensibilityKind

Public Types

enum type

Values:

enumerator FINAL
enumerator EXTENSIBLE
enumerator MUTABLE
class dds::topic::Filter : public dds::core::Value
#include <Filter.hpp>

Filter objects contain SQL expressions that allow the application to specify a filter on the locally available data.

A Filter is used to create a ContentFilteredTopic.

SQL Expression

The SQL query string is set by expression which must be a subset of the SQL query language. In this query expression, parameters may be used, which must be set in the sequence of strings defined by the parameter query_parameters. A parameter is a string which can define an integer, float, string or enumeration. The number of values in query_parameters must be equal or greater than the highest referenced n token in the query_expression (e.g. if %1 and %8 are used as parameters in the query_expression, the query_parameters should at least contain n+1 = 9 values).

Look here for the specific query expression syntax.

See

dds::topic::ContentFilteredTopic

See

for more information: Topic Definition

Public Types

typedef D::iterator iterator

Iterator for the query expression parameters.

typedef D::const_iterator const_iterator

Iterator for the query expression parameters.

Public Functions

Filter(const std::string &query_expression)

Create a Filter based on a query expression.

Parameters

query_expression – an SQL expression

Throws

dds::core::Exception

template<typename FWIterator>
Filter(const std::string &query_expression, const FWIterator &params_begin, const FWIterator &params_end)

Create a Filter based on a query expression and an iterable parameter container.

Parameters
  • query_expression – an SQL expression

  • params_begin – Iterator pointing to the beginning of the parameters to set

  • params_end – Iterator pointing to the end of the parameters to set

Throws

dds::core::Exception

Filter(const std::string &query_expression, const std::vector<std::string> &params)

Create a Filter based on a query expression and parameter vector.

Parameters
  • query_expression – an SQL expression

  • params – Vector containing SQL expression parameters

Throws

dds::core::Exception

const std::string &expression() const

Get the query expression.

Throws

dds::core::Exception

Returns

std::string The SQL expression.

const_iterator begin() const

Provides the begin iterator to the SQL expression parameter list.

See SQL expression info

Throws

dds::core::Exception

Returns

dds::topic::Filter::const_iterator The begin iterator

const_iterator end() const

The end iterator to the SQL expression parameter list.

See SQL expression info

Throws

dds::core::Exception

Returns

dds::topic::Filter::const_iterator The end iterator

iterator begin()

Provides the begin iterator to the SQL expression parameter list.

See SQL expression info

Throws

dds::core::Exception

Returns

dds::topic::Filter::iterator The begin iterator

iterator end()

The end iterator to the SQL expression parameter list.

See SQL expression info

Throws

dds::core::Exception

Returns

dds::topic::Filter::iterator The end iterator

template<typename FWIterator>
void parameters(const FWIterator &begin, const FWIterator end)

Sets the query parameters.

See SQL expression info

Parameters
  • begin – Iterator pointing to the beginning of the parameters to set

  • end – Iterator pointing to the end of the parameters to set

Throws

dds::core::Exception

void add_parameter(const std::string &param)

Adds a parameter to the query.

See SQL expression info

Parameters

param – The parameter to add

Throws

dds::core::Exception

uint32_t parameters_length() const

Gets the number of parameters in the query of the filter.

See SQL expression info

Throws

dds::core::Exception

Returns

uint32_t The number of parameters in the query

template<typename D>
Filter(const std::string &query_expression)
template<typename D>
Filter(const std::string &query_expression, const std::vector<std::string> &params)
class org::eclipse::cyclonedds::topic::FilterDelegate

Public Types

typedef std::vector<std::string>::iterator iterator
typedef std::vector<std::string>::const_iterator const_iterator

Public Functions

FilterDelegate()
FilterDelegate(const std::string &query_expression)
template<typename FWIterator>
inline FilterDelegate(const std::string &query_expression, const FWIterator &params_begin, const FWIterator &params_end)
const std::string &expression() const
const_iterator begin() const
const_iterator end() const
iterator begin()
iterator end()
template<typename FWIterator>
inline void parameters(const FWIterator &begin, const FWIterator end)
void add_parameter(const std::string &param)
uint32_t parameters_length() const
bool operator==(const FilterDelegate &other) const

Private Members

std::string myExpression
std::vector<std::string> myParams
template<typename TOPIC, typename DELEGATE>
struct org::eclipse::cyclonedds::topic::finder

Public Static Functions

static inline TOPIC find(const dds::domain::DomainParticipant &dp, const std::string &topic_name)
template<>
struct org::eclipse::cyclonedds::topic::finder<dds::topic::AnyTopic, org::eclipse::cyclonedds::topic::AnyTopicDelegate>

Public Static Functions

static inline dds::topic::AnyTopic find(const dds::domain::DomainParticipant &dp, const std::string &topic_name)
template<>
struct org::eclipse::cyclonedds::topic::finder<dds::topic::TopicDescription, org::eclipse::cyclonedds::topic::TopicDescriptionDelegate>

Public Static Functions

static inline dds::topic::TopicDescription find(const dds::domain::DomainParticipant &dp, const std::string &topic_name)
template<typename FUN>
class org::eclipse::cyclonedds::core::cond::FunctorHolder : public org::eclipse::cyclonedds::core::cond::FunctorHolderBase

Public Functions

inline FunctorHolder(FUN functor)
inline virtual ~FunctorHolder()
inline virtual void dispatch(dds::core::cond::Condition<org::eclipse::cyclonedds::core::cond::ConditionDelegate> &condition)

Private Members

FUN myFunctor
class org::eclipse::cyclonedds::core::cond::FunctorHolderBase

Subclassed by org::eclipse::cyclonedds::core::cond::FunctorHolder< FUN >

Public Functions

inline FunctorHolderBase()
inline virtual ~FunctorHolderBase()
virtual void dispatch(dds::core::cond::Condition<org::eclipse::cyclonedds::core::cond::ConditionDelegate> &condition) = 0
class dds::sub::GenerationCount : public dds::core::Value
#include <GenerationCount.hpp>

Class to hold sample GenerationCount information and is part of dds::sub::SampleInfo.

Generations A generation is defined as: ‘the number of times an instance has become alive (with instance_state==ALIVE) at the time the sample was received’. Note that the generation counters are initialized to zero when a DataReader first detects a never-seen-before instance.

For each instance the middleware internally maintains two counts: the disposed_generation_count and no_writers_generation_count, relative to each DataReader:

Two types of generations are distinguished: disposed_generation_count and no_writers_generation_count.

  • The disposed_generation_count and no_writers_generation_count are initialized to zero when the DataReader first detects the presence of a never-seen-before instance.

  • The disposed_generation_count is incremented each time the instance_state of the corresponding instance changes from not_alive_disposed to alive.

  • The no_writers_generation_count is incremented each time the instance_state of the corresponding instance changes from not_alive_no_writers to alive.

The disposed_generation_count and no_writers_generation_count associated with the SampleInfo capture a snapshot of the corresponding counters at the time the sample was received.

See

for more information: SampleInfo

Public Functions

int32_t disposed() const

Gets the disposed_generation_count.

The disposed_generation_count is initialized at zero and is incremented each time the instance_state, of the corresponding instance, changes from not_alive_disposed to alive.

Returns

the disposed_generation_count

inline int32_t no_writers() const

Gets the no_writers_generation_count.

The no_writers_generation_count is initialized at zero and is incremented each time the instance_state, of the corresponding instance, changes from not_alive_no_writers to alive.

Returns

the no_writers_generation_count

class org::eclipse::cyclonedds::sub::GenerationCountImpl

Public Functions

inline GenerationCountImpl()
inline GenerationCountImpl(int32_t d, int32_t nw)
inline int32_t disposed() const
inline void disposed(int32_t d)
inline int32_t no_writers() const
inline void no_writers(int32_t nw)
inline bool operator==(const GenerationCountImpl &other) const

Private Members

int32_t d_
int32_t nw_
class dds::core::policy::GroupData : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

GroupData()

Creates a GroupData QoS instance

explicit GroupData(const dds::core::ByteSeq &sequence)

Creates a GroupData QoS instance

Parameters

sequence – the sequence of octets representing the GroupData

GroupData(const GroupData &other)

Copies a GroupData QoS instance

Parameters

other – the GroupData QoS instance to copy

GroupData &operator=(const GroupData &other) = default

Copies a GroupData QoS instance

Parameters

other – the GroupData QoS instance to copy

Returns

Reference to the GroupData QoS instance that was copied to

GroupData(const uint8_t *value_begin, const uint8_t *value_end)

Creates a GroupData QoS instance

Parameters
  • value_begin – a pointer to the beginning of a sequence of octets

  • value_end – a pointer to the end of a sequence of octets

GroupData &value(const dds::core::ByteSeq &sequence)

Set the sequence

Parameters

sequence – a sequence of octets

template<typename OCTET_ITER>
GroupData &value(OCTET_ITER begin, OCTET_ITER end)

Set the sequence

Parameters
  • begin – an iterator pointing to the beginning of a sequence of octets

  • end – an iterator pointing to the end of a sequence of octets

const dds::core::ByteSeq value() const

Get the sequence

Returns

a sequence of octets

const uint8_t *begin() const

Gets a pointer to the first octet in the sequence

Returns

a pointer to the first octet in the sequence

const uint8_t *end() const

Gets a pointer to the last octet in the sequence

Returns

a pointer to the last octet in the sequence

class org::eclipse::cyclonedds::core::policy::GroupDataDelegate

Public Functions

GroupDataDelegate()
GroupDataDelegate(const GroupDataDelegate &other)
GroupDataDelegate &operator=(const GroupDataDelegate &other) = default
explicit GroupDataDelegate(const dds::core::ByteSeq &seq)
void value(const dds::core::ByteSeq &seq)
const dds::core::ByteSeq &value() const
bool operator==(const GroupDataDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::ByteSeq value_
class dds::core::cond::GuardCondition : public dds::core::cond::Condition
#include <GuardCondition.hpp>

A GuardCondition object is a specific Condition whose trigger_value is completely under the control of the application.

When a GuardCondition is initially created, the trigger_value is FALSE.

The purpose of the GuardCondition is to provide the means for the application to manually triggering a WaitSet to stop waiting. This is accomplished by attaching the GuardCondition to the WaitSet and then setting the trigger_value by means of the set trigger_value operation.

dds::core::cond::GuardCondition guard;
dds::core::cond::WaitSet waitset;
waitset.attach_condition(guard);
waitset.wait();
...
// To wakeup waitset, do in another thread:
guard.trigger_value(true);
See the WaitSet examples

for more examples.

Although the

WaitSet examples use the StatusCondition, the basic usage of this Condition with a WaitSet is the same.

See

dds::core::cond::Condition

See

for more information: WaitSet concept

See

for more information: WaitSet examples

Public Functions

GuardCondition()

Create a dds::core::cond::GuardCondition.

The GuardCondition can then be added to a dds::core::cond::WaitSet so that the application can manually wake up a thread that is blocked on that WaitSet.

Throws

dds::core::Exception

template<typename FUN>
GuardCondition(FUN functor)

Create a dds::core::cond::GuardCondition.

The GuardCondition can then be added to a dds::core::cond::WaitSet so that the application can manually wake up a thread that is blocked on that WaitSet.

The supplied functor will be called when this GuardCondition is triggered and either the inherited dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this GuardCondition is attached to.

Parameters

functor – The functor to be called when the GuardCondition triggers.

Throws

dds::core::Exception

void trigger_value(bool value)

This operation sets the trigger_value of the GuardCondition.

A GuardCondition object is a specific Condition which trigger_value is completely under the control of the application. This operation must be used by the application to manually wake-up a WaitSet. This operation sets the trigger_value of the GuardCondition to the parameter value. The GuardCondition is directly created using the GuardCondition constructor. When a GuardCondition is initially created, the trigger_value is FALSE.

Parameters

value – The boolean value to which the GuardCondition is set.

Throws

dds::core::Exception

bool trigger_value()

This operation retrieves the trigger_value of the Condition.

A Condition has a trigger_value that can be TRUE or FALSE and is set by the Data Distribution Service (except a GuardCondition). This operation returns the trigger_value of the Condition.

Throws

dds::core::Exception

Returns

bool The boolean value to which the Condition is set.

class org::eclipse::cyclonedds::core::cond::GuardConditionDelegate : public org::eclipse::cyclonedds::core::cond::ConditionDelegate

Public Functions

GuardConditionDelegate()
~GuardConditionDelegate()
virtual void close()
virtual bool trigger_value() const
void trigger_value(bool value)
class dds::core::policy::History : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

History(dds::core::policy::HistoryKind::Type kind = dds::core::policy::HistoryKind::KEEP_LAST, int32_t depth = 1)

Creates a History QoS instance

Parameters
  • kind – the kind

  • depth – the history depth

History(const History &other)

Copies a History QoS instance

Parameters

other – the History QoS instance to copy

History &operator=(const History &other) = default

Copies a History QoS instance

Parameters

other – the History QoS instance to copy

Returns

reference to the History QoS that was copied to

dds::core::policy::HistoryKind::Type kind() const

Gets the kind

Returns

the kind

History &kind(dds::core::policy::HistoryKind::Type kind)

Sets the kind

Parameters

kind – the kind

int32_t depth() const

Gets the history depth

Returns

the history depth

History &depth(int32_t depth)

Sets the history depth

Parameters

depth – the history depth to set

Returns

the history depth that was set

Public Static Functions

static History KeepAll()
Returns

a History QoS instance with the kind set to KEEP_ALL

static History KeepLast(uint32_t depth)
Parameters

depth – the history depth

Returns

a History QoS instance with the kind set to KEEP_LAST and the depth set to the supplied value

class org::eclipse::cyclonedds::core::policy::HistoryDelegate

Public Functions

HistoryDelegate(const HistoryDelegate &other)
HistoryDelegate(dds::core::policy::HistoryKind::Type kind, int32_t depth)
HistoryDelegate &operator=(const HistoryDelegate &other) = default
dds::core::policy::HistoryKind::Type kind() const
void kind(dds::core::policy::HistoryKind::Type kind)
int32_t depth() const
void depth(int32_t depth)
bool operator==(const HistoryDelegate &other) const
void check() const
void check_against(const org::eclipse::cyclonedds::core::policy::ResourceLimitsDelegate &limits) const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::policy::HistoryKind::Type kind_
int32_t depth_
struct dds::core::policy::HistoryKind

Public Types

enum Type

Values:

enumerator KEEP_LAST

The Data Distribution Service will only attempt to keep the latest values of the instance and discard the older ones. The attribute “depth” determines how many samples in history will be stored. In other words, only the most recent samples in history are stored. On the publishing side, the Data Distribution Service will only keep the most recent “depth” samples of each instance of data (identified by its key) managed by the DataWriter. On the subscribing side, the DataReader will only keep the most recent “depth” samples received for each instance (identified by its key) until the application “takes” them via the DataReader::take operation. KEEP_LAST_HISTORY_QOS - is the default kind. The default value of depth is 1, indicating that only the most recent value should be delivered. If a depth other than 1 is specified, it should be compatible with the settings of the ResourcelimitsQosPolicy max_samples_per_instance. For these two QosPolicy settings to be compatible, they must verify that depth <= max_samples_per_instance, otherwise a RETCODE_INCONSISTENT_POLICY is generated on relevant operations.

enumerator KEEP_ALL

All samples are stored, provided, the resources are available. On the publishing side, the Data Distribution Service will attempt to keep all samples (representing each value written) of each instance of data (identified by its key) managed by the DataWriter until they can be delivered to all subscribers. On the subscribing side, the Data Distribution Service will attempt to keep all samples of each instance of data (identified by its key) managed by the DataReader. These samples are kept until the application “takes” them from the Data Distribution Service via the DataReader::take operation. The setting of depth has no effect. Its implied value is LENGTH_UNLIMITED. The resources that the Data Distribution Service can use to keep this history are limited by the settings of the ResourceLimitsQosPolicy. If the limit is reached, the behaviour of the Data Distribution Service will depend on the ReliabilityQosPolicy. If the ReliabilityQosPolicy is BEST_EFFORT_RELIABILITY_QOS, the old values are discarded. If ReliabilityQosPolicy is RELIABLE_RELIABILITY_QOS, the Data Distribution Service will block the DataWriter until it can deliver the necessary old values to all subscribers.

class dds::core::xtypes::IdAnnotation : public dds::core::xtypes::Annotation

Public Functions

IdAnnotation(uint32_t id)
uint32_t id() const
class IdAnnotation : public dds::core::xtypes::detail::Annotation
class IllegalOperationError : public dds::core::Exception, public logic_error
#include <Exception.hpp>

Exception: An operation was invoked on an inappropriate object or at an inappropriate time.

This is determined by policies set by the specification or the Service implementation.

There is no precondition that could be changed to make the operation succeed.

class ImmutablePolicyError : public dds::core::Exception, public logic_error
#include <Exception.hpp>

Exception: Application attempted to modify an immutable QosPolicy.

class InconsistentPolicyError : public dds::core::Exception, public logic_error
#include <Exception.hpp>

Exception: Application specified a set of policies that are not consistent with each other.

class dds::core::status::InconsistentTopicStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

InconsistentTopicStatus()
int32_t total_count() const
Returns

Total cumulative count of all inconsistent topics detected.

int32_t total_count_change() const
Returns

The incremental number of inconsistent topics since the last time the listener was called or the status was read.

class org::eclipse::cyclonedds::core::InconsistentTopicStatusDelegate

Public Functions

inline InconsistentTopicStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline bool operator==(const InconsistentTopicStatusDelegate &other) const
inline void ddsc_status(const dds_inconsistent_topic_status_t *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
class dds::core::InstanceHandle : public dds::core::Value
#include <InstanceHandle.hpp>

Class to hold the handle associated with in sample instance.

Public Functions

InstanceHandle()

Create an nil instance handle.

InstanceHandle(const dds::core::null_type &nullHandle)

Create an nil instance handle.

Parameters

nullHandle – placeholder

InstanceHandle(const InstanceHandle &other)

Copy an existing InstanceHandle

Parameters

otherInstanceHandle to copy

InstanceHandle(InstanceHandle &&other)

Move an existing InstanceHandle

Parameters

otherInstanceHandle to move

InstanceHandle &operator=(const InstanceHandle &that)

Copy-assign an existing InstanceHandle to this InstanceHandle

Parameters

that – The InstanceHandle to assign to this

InstanceHandle &operator=(InstanceHandle &&that)

Move-assign an existing InstanceHandle to this InstanceHandle

Parameters

that – The InstanceHandle to assign to this

bool operator==(const InstanceHandle &that) const

Compare this InstanceHandle to another InstanceHandle

Parameters

that – The InstanceHandle to compare

Returns

true if they match

bool operator<(const InstanceHandle &that) const

Compare this InstanceHandle to another InstanceHandle

Parameters

that – The InstanceHandle to compare

Returns

true if this is less than that

bool operator>(const InstanceHandle &that) const

Compare this InstanceHandle to another InstanceHandle

Parameters

that – The InstanceHandle to compare

Returns

true if this is greater than that

bool is_nil() const

Check if the InstanceHandle is nil.

Returns

true if the InstanceHandle is nil

Public Static Functions

static const InstanceHandle nil()

Create an nil instance handle.

Returns

a nil InstanceHandle

class org::eclipse::cyclonedds::core::InstanceHandleDelegate

Public Functions

InstanceHandleDelegate()
InstanceHandleDelegate(dds_instance_handle_t h)
InstanceHandleDelegate(const dds::core::null_type &src)
bool operator==(const InstanceHandleDelegate &that) const
bool operator<(const InstanceHandleDelegate &that) const
bool operator>(const InstanceHandleDelegate &that) const
InstanceHandleDelegate &operator=(const dds::core::null_type &src)
bool is_nil() const
dds_instance_handle_t handle() const

Private Members

dds_instance_handle_t handle_
class dds::sub::functors::detail::InstanceManipulatorFunctor

Public Functions

inline InstanceManipulatorFunctor(const dds::core::InstanceHandle &h)
template<typename S>
inline void operator()(S &s)

Private Members

dds::core::InstanceHandle handle_
class dds::sub::status::InstanceState : public std::bitset<OMG_DDS_STATE_BIT_COUNT>
#include <DataState.hpp>

Class to hold sample InstanceState information.

For each instance the Data Distribution Service internally maintains an InstanceState. The InstanceState can be:

  • , which indicates that

    • samples have been received for the instance

    • there are live DataWriter objects writing the instance

    • the instance has not been explicitly disposed of (or else samples have been received after it was disposed of)

  • , which indicates that

    • the instance was disposed of by a DataWriter, either explicitly by means of the dispose operation or implicitly in case the autodispose_unregistered_instances field of the WriterDataLyfecycle QosPolicy equals TRUE when the instance gets unregistered, WriterDataLifecycle QosPolicy and no new samples for that instance have been written afterwards.

  • , which indicates that

    • the instance has been declared as not-alive by the DataReader because it detected that there are no live DataWriter objects writing that instance.

See

for more information: SampleInfo

Public Types

typedef std::bitset<OMG_DDS_STATE_BIT_COUNT> MaskType

Convenience typedef for std::bitset<OMG_DDS_STATE_BIT_COUNT>.

Public Functions

InstanceState()

Construct an InstanceState with no state flags set.

explicit InstanceState(uint32_t m)

Construct an InstanceState with an uint32_t m, representing a bit array.

Parameters

m – the bit array to initialize the bitset with

InstanceState(const InstanceState &src)

Copy constructor.

Construct an InstanceState with existing InstanceState.

Parameters

src – the InstanceState to copy from

InstanceState &operator=(const InstanceState &src) = default

Copy assignment operator.

Copy the contents from one InstanceState to another.

Parameters

src – the InstanceState to copy from

Returns

reference to the InstanceState instance that was copied to

InstanceState(const MaskType &src)

Construct an InstanceState with existing MaskType.

Parameters

src – the bitset to copy from

Public Static Functions

static inline const InstanceState alive()

Get ALIVE_INSTANCE_STATE.

alive, which indicates that

  • samples have been received for the instance

  • there are live DataWriter objects writing the instance

  • the instance has not been explicitly disposed of (or else samples have been received after it was disposed of)

Returns

the alive InstanceState

static inline const InstanceState not_alive_disposed()

Get NOT_ALIVE_DISPOSED_INSTANCE_STATE.

not_alive_disposed, which indicates that

  • the instance was disposed of by a DataWriter, either explicitly by means of the dispose operation or implicitly in case the autodispose_unregistered_instances field of the WriterDataLyfecycle QosPolicy equals TRUE when the instance gets unregistered, WriterDataLifecycle QosPolicy and no new samples for that instance have been written afterwards.

Returns

the not_alive_disposed InstanceState

static inline const InstanceState not_alive_no_writers()

Get NOT_ALIVE_NO_WRITERS_INSTANCE_STATE.

not_alive_no_writers, which indicates that

  • the instance has been declared as not-alive by the DataReader because it detected that there are no live DataWriter objects writing that instance.

Returns

the not_alive_no_writers InstanceState

static inline const InstanceState not_alive_mask()

Get not_alive mask

not_alive = not_alive_disposed | not_alive_no_writers:

  • not_alive_disposed, which indicates that

    • the instance was disposed of by a DataWriter, either explicitly by means of the dispose operation or implicitly in case the autodispose_unregistered_instances field of the WriterDataLyfecycle QosPolicy equals TRUE when the instance gets unregistered, WriterDataLifecycle QosPolicy and no new samples for that instance have been written afterwards.

  • not_alive_no_writers, which indicates that

    • the instance has been declared as not-alive by the DataReader because it detected that there are no live DataWriter objects writing that instance.

Returns

the not_alive_mask InstanceState

static inline const InstanceState any()

Get any InstanceState.

This Instance is either in existence or not in existence.

Returns

the any InstanceState

class InvalidArgumentError : public dds::core::Exception, public invalid_argument
#include <Exception.hpp>

Exception: Application is passing an invalid argument.

class InvalidDataError : public dds::core::Exception, public logic_error
#include <Exception.hpp>

Exception: Application provided invalid data

class InvalidDowncastError : public dds::core::Exception, public runtime_error
#include <Exception.hpp>

Exception: Application has attempted to cast incompatible types.

struct org::eclipse::cyclonedds::core::policy::InvalidSampleVisibility

Public Types

enum Type

Values:

enumerator NO_INVALID_SAMPLES
enumerator MINIMUM_INVALID_SAMPLES
enumerator ALL_INVALID_SAMPLES
template<typename T1, typename T2>
struct is_base_of : public std::is_base_of<T1, T2>
template<typename T, typename _ = void>
struct is_container : public false_type
template<typename ...Ts>
struct is_container_helper
template<typename T1, typename T2>
struct is_same : public std::is_same<T1, T1>
template<typename Test, template<typename...> class Ref>
struct is_specialization : public false_type
template<template<typename...> class Ref, typename ...Args>
struct is_specialization<Ref<Args...>, Ref> : public true_type
template<typename T>
struct dds::topic::is_topic_type
#include <TopicTraits.hpp>

Support functionality to check if a given object type is a Topic.

if (dds::topic::is_topic_type<Foo::Bar>::value) {
    // Foo::Bar type is considered a Topic
} else {
    // Foo::Bar type is NOT considered a Topic
}

Public Types

enum [anonymous]

Values:

enumerator value
class dds::core::xtypes::KeyAnnotation : public dds::core::xtypes::Annotation

Public Functions

KeyAnnotation()
class KeyAnnotation : public dds::core::xtypes::detail::Annotation
class KeyedBytesTopicType
class KeyedStringTopicType
class dds::core::policy::LatencyBudget : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit LatencyBudget(const dds::core::Duration &duration = dds::core::Duration::zero())

Creates a LatencyBudget QoS instance

Parameters

duration – duration

LatencyBudget(const LatencyBudget &other)

Copies a LatencyBudget QoS instance

Parameters

other – the LatencyBudget QoS instance to copy

LatencyBudget &operator=(const LatencyBudget &other) = default

Copies a LatencyBudget QoS instance

Parameters

other – the LatencyBudget QoS instance to copy

Returns

reference to the LatencyBudget QoS instance that was copied to

LatencyBudget &duration(const dds::core::Duration &duration)

Sets the duration

Parameters

duration – duration

const dds::core::Duration duration() const

Gets the duration

Returns

duration

class org::eclipse::cyclonedds::core::policy::LatencyBudgetDelegate

Public Functions

LatencyBudgetDelegate(const LatencyBudgetDelegate &other)
explicit LatencyBudgetDelegate(const dds::core::Duration &d)
LatencyBudgetDelegate &operator=(const LatencyBudgetDelegate &other) = default
void duration(const dds::core::Duration &d)
const dds::core::Duration duration() const
bool operator==(const LatencyBudgetDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::Duration duration_
class dds::core::policy::Lifespan : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit Lifespan(const dds::core::Duration &duration = dds::core::Duration::infinite())

Creates a Lifespan QoS instance

Parameters

durationLifespan expiration duration

Lifespan(const Lifespan &other)

Copies a Lifespan QoS instance

Parameters

other – the Lifespan QoS instance to copy

Lifespan &operator=(const Lifespan &other) = default

Copies a Lifespan QoS instance

Parameters

other – the Lifespan QoS instance to copy

Returns

Reference to the Lifespan QoS instance that was copied to

Lifespan &duration(const dds::core::Duration &duration)

Sets the expiration duration

Parameters

duration – expiration duration

const dds::core::Duration duration() const

Gets the expiration duration

Returns

expiration duration

class org::eclipse::cyclonedds::core::policy::LifespanDelegate

Public Functions

LifespanDelegate(const LifespanDelegate &other)
explicit LifespanDelegate(const dds::core::Duration &d)
LifespanDelegate &operator=(const LifespanDelegate &other) = default
void duration(const dds::core::Duration &d)
const dds::core::Duration duration() const
bool operator==(const LifespanDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::Duration duration_
class dds::core::policy::Liveliness : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

Liveliness(dds::core::policy::LivelinessKind::Type kind = dds::core::policy::LivelinessKind::AUTOMATIC, const dds::core::Duration &lease_duration = dds::core::Duration::infinite())

Creates a Liveliness QoS instance

Parameters
  • kind – the kind

  • lease_duration – the lease_duration

Liveliness(const Liveliness &other)

Copies a Liveliness QoS instance

Parameters

other – the Liveliness QoS instance to copy

Liveliness &operator=(const Liveliness &other) = default

Copies a Liveliness QoS instance

Parameters

other – the Liveliness QoS instance to copy

Returns

reference to the Liveliness QoS that was copied to

Liveliness &kind(dds::core::policy::LivelinessKind::Type kind)

Sets the kind

Parameters

kind – the kind

dds::core::policy::LivelinessKind::Type kind() const

Gets the kind

Returns

the kind

Liveliness &lease_duration(const dds::core::Duration &lease_duration)

Sets the lease_duration

Returns

the lease_duration

const dds::core::Duration lease_duration() const

Gets the lease_duration

Returns

the lease_duration

Public Static Functions

static Liveliness Automatic(const dds::core::Duration &lease_duration = dds::core::Duration::infinite())
Returns

a Liveliness QoS instance with the kind set to AUTOMATIC and the lease_duration set to the supplied value

static Liveliness ManualByParticipant(const dds::core::Duration &lease_duration = dds::core::Duration::infinite())
Returns

a Liveliness QoS instance with the kind set to MANUAL_BY_PARTICIPANT and the lease_duration set to the supplied value

static Liveliness ManualByTopic(const dds::core::Duration &lease_duration = dds::core::Duration::infinite())
Returns

a Liveliness QoS instance with the kind set to MANUAL_BY_TOPIC and the lease_duration set to the supplied value

class dds::core::status::LivelinessChangedStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

LivelinessChangedStatus()
int32_t alive_count() const
Returns

The total number of currently active DataWriters that write the Topic read by the DataReader. This count increases when a newly-matched DataWriter asserts its liveliness for the first time or when a DataWriter previously considered to be not alive reasserts its liveliness. The count decreases when a DataWriter considered alive fails to assert its liveliness and becomes not alive, whether because it was deleted normally or for some other reason.

int32_t not_alive_count() const
Returns

The total count of currently DataWriters that write the Topic read by the DataReader that are no longer asserting their liveliness. This count increases when a DataWriter considered alive fails to assert its liveliness and becomes not alive for some reason other than the normal deletion of that DataWriter. It decreases when a previously not alive DataWriter either reasserts its liveliness or is deleted normally.

int32_t alive_count_change() const
Returns

The change in the alive_count since the last time the listener was called or the status was read.

int32_t not_alive_count_change() const
Returns

The change in the not_alive_count since the last time the listener was called or the status was read.

const dds::core::InstanceHandle last_publication_handle() const
Returns

Handle to the last DataWriter whose change in liveliness caused this status to change.

class org::eclipse::cyclonedds::core::LivelinessChangedStatusDelegate

Public Functions

inline LivelinessChangedStatusDelegate()
inline int32_t alive_count() const
inline int32_t not_alive_count() const
inline int32_t alive_count_change() const
inline int32_t not_alive_count_change() const
inline void alive_count(int32_t alive_count)
inline void not_alive_count(int32_t not_alive_count)
inline void alive_count_change(int32_t alive_count_change)
inline void not_alive_count_change(int32_t not_alive_count_change)
inline void last_publication_handle(dds::core::InstanceHandle last_publication_handle)
inline dds::core::InstanceHandle last_publication_handle() const
inline bool operator==(const LivelinessChangedStatusDelegate &other) const
inline void ddsc_status(const dds_liveliness_changed_status_t *from)

Protected Attributes

int32_t alive_count_
int32_t not_alive_count_
int32_t alive_count_change_
int32_t not_alive_count_change_
dds::core::InstanceHandle last_publication_handle_
class org::eclipse::cyclonedds::core::policy::LivelinessDelegate

Public Functions

LivelinessDelegate(const LivelinessDelegate &other)
LivelinessDelegate(dds::core::policy::LivelinessKind::Type kind, dds::core::Duration lease_duration)
LivelinessDelegate &operator=(const LivelinessDelegate &other) = default
void kind(dds::core::policy::LivelinessKind::Type kind)
dds::core::policy::LivelinessKind::Type kind() const
void lease_duration(const dds::core::Duration &lease_duration)
const dds::core::Duration lease_duration() const
bool operator==(const LivelinessDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::policy::LivelinessKind::Type kind_
dds::core::Duration lease_duration_
struct dds::core::policy::LivelinessKind

Public Types

enum Type

Values:

enumerator AUTOMATIC

The Data Distribution Service will take care of reporting the Liveliness automatically with a rate determined by the lease_duration.

enumerator MANUAL_BY_PARTICIPANT

The application must take care of reporting the liveliness before the lease_duration expires. If an Entity reports its liveliness, all Entities within the same DomainParticipant that have their liveliness kind set to MANUAL_BY_PARTICIPANT_LIVELINESS_QOS, can be considered alive by the Data Distribution Service. Liveliness can reported explicitly by calling the operation assert_liveliness on the DomainParticipant or implicitly by writing some data.

enumerator MANUAL_BY_TOPIC

The application must take care of reporting the liveliness before the lease_duration expires. This can explicitly be done by calling the operation assert_liveliness on the DataWriter or implicitly by writing some data.

class dds::core::status::LivelinessLostStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

LivelinessLostStatus()
int32_t total_count() const
Returns

Total cumulative number of times that a previously-alive DataWriter became ‘not alive’ due to a failure to actively signal its liveliness within its offered liveliness period. This count does not change when an already not alive DataWriter simply remains not alive for another liveliness period.

int32_t total_count_change() const
Returns

The change in total_count since the last time the listener was called or the status was read.

class org::eclipse::cyclonedds::core::LivelinessLostStatusDelegate

Public Functions

inline LivelinessLostStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline bool operator==(const LivelinessLostStatusDelegate &other) const
inline void ddsc_status(const dds_liveliness_lost_status_t *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
template<typename T>
class dds::sub::LoanedSamples
#include <LoanedSamples.hpp>

This class encapsulates and automates the management of loaned samples.

It is a container which is used to hold samples which have been read or taken by the DataReader. Samples are effectively “loaned” from the DataReader to avoid the need to copy the data. When the LoanedSamples container goes out of scope the loan is automatically returned.

LoanedSamples maintains a ref count so that the loan will only be returned once all copies of the same LoanedSamples have been destroyed.

dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);

// Assume there is data to read
{
    dds::sub::LoanedSamples<Foo::Bar> samples = reader.read();
    dds::sub::LoanedSamples<Foo::Bar>::const_iterator it;
    for (it = samples.begin(); it != samples.end(); ++it) {
        const dds::sub::Sample<Foo::Bar>& sample = *it;
        const Foo::Bar& data = sample.data();
        const dds::sub::SampleInfo& info = sample.info();
        // Use sample data and meta information.
    }

    function(samples);
}
// LoanedSamples out of scope. Whether the loan is returned, depends what the reference
// count of the LoanedSamples is. That again, depends on what the function() did with it.
// Maybe function() stored the LoanedSamples, maybe not. Whatever the case, LoanedSamples
// takes care of the loan and resource handling.

See

for more information: DataSample

See

for more information: SampleInfo

See

for more information: Subscription

Public Types

typedef T DataType

Convenience typedef for the type of the data sample.

typedef DELEGATE<T>::const_iterator const_iterator

Convenience typedef for the iterator over the loaned samples.

Public Functions

LoanedSamples()

Constructs a LoanedSamples instance.

~LoanedSamples()

Implicitly return the loan if this is the last object with a reference to the contained loan.

LoanedSamples(const LoanedSamples &other)

Copies a LoanedSamples instance.

No actual data samples are copied.

Just references and reference counts are updated.

LoanedSamples(LoanedSamples &&other)

Move-constructs a LoanedSamples instance.

No actual data samples are copied.

Just references and reference counts are updated.

LoanedSamples &operator=(const LoanedSamples &other) = default

Copy-assigns a LoanedSamples instance to another.

No actual data samples are copied.

Just references and reference counts are updated.

LoanedSamples &operator=(LoanedSamples &&other) = default

Move-assigns a LoanedSamples instance to another.

No actual data samples are copied.

Just references and reference counts are updated.

const_iterator begin() const

Gets an iterator pointing to the first sample in the LoanedSamples container.

See example.

Returns

an iterator pointing to the first sample

const_iterator end() const

Gets an iterator pointing to the end of the LoanedSamples container.

See example.

Returns

an iterator pointing to the end of the container

uint32_t length() const

Gets the number of samples within the LoanedSamples container.

Returns

the number of samples

Private Members

DELEGATE_REF_T delegate_
template<typename T>
class dds::sub::detail::LoanedSamples

Public Types

typedef std::vector<dds::sub::SampleRef<T, dds::sub::detail::SampleRef>> LoanedSamplesContainer
typedef std::vector<dds::sub::SampleRef<T, dds::sub::detail::SampleRef>>::iterator iterator
typedef std::vector<dds::sub::SampleRef<T, dds::sub::detail::SampleRef>>::const_iterator const_iterator

Public Functions

inline LoanedSamples()
inline ~LoanedSamples()
inline iterator mbegin()
inline const_iterator begin() const
inline const_iterator end() const
inline uint32_t length() const
inline void reserve(uint32_t s)
inline void resize(uint32_t s)
inline dds::sub::SampleRef<T, dds::sub::detail::SampleRef> &operator[](uint32_t i)
inline dds::sub::SampleRef<T, dds::sub::detail::SampleRef> *get_buffer()

Private Members

LoanedSamplesContainer samples_
template<>
class dds::sub::detail::LoanedSamples<org::eclipse::cyclonedds::topic::CDRBlob>

Public Types

typedef std::vector<dds::sub::Sample<org::eclipse::cyclonedds::topic::CDRBlob, dds::sub::detail::Sample>> LoanedSamplesContainer
typedef std::vector<dds::sub::Sample<org::eclipse::cyclonedds::topic::CDRBlob, dds::sub::detail::Sample>>::iterator iterator
typedef std::vector<dds::sub::Sample<org::eclipse::cyclonedds::topic::CDRBlob, dds::sub::detail::Sample>>::const_iterator const_iterator

Public Functions

inline LoanedSamples()
inline ~LoanedSamples()
inline iterator mbegin()
inline const_iterator begin() const
inline const_iterator end() const
inline uint32_t length() const
inline void reserve(uint32_t s)
inline void resize(uint32_t s)
inline dds::sub::Sample<org::eclipse::cyclonedds::topic::CDRBlob, dds::sub::detail::Sample> &operator[](uint32_t i)
inline dds::sub::Sample<org::eclipse::cyclonedds::topic::CDRBlob, dds::sub::detail::Sample> *get_buffer()

Private Members

LoanedSamplesContainer samples_
template<typename T>
class dds::sub::detail::LoanedSamplesHolder : public dds::sub::detail::SamplesHolder

Public Functions

inline LoanedSamplesHolder(dds::sub::LoanedSamples<T> &samples)
inline virtual void set_length(uint32_t len)
inline virtual uint32_t get_length() const
inline virtual SamplesHolder &operator++(int)
inline virtual void *data()
inline virtual detail::SampleInfo &info()
inline virtual void **cpp_sample_pointers(size_t length)
inline virtual dds_sample_info_t *cpp_info_pointers(size_t length)
inline virtual void set_sample_contents(void **c_sample_pointers, dds_sample_info_t *info)
inline virtual void fini_samples_buffers(void **&c_sample_pointers, dds_sample_info_t *&c_sample_infos)

Private Members

dds::sub::LoanedSamples<T> &samples_
uint32_t index_
template<typename TOPIC, typename DELEGATE>
struct org::eclipse::cyclonedds::topic::lookup_topic

Public Static Functions

static inline TOPIC discover(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const dds::core::Duration &timeout)
static inline void discover(const dds::domain::DomainParticipant &dp, std::vector<TOPIC> &list, uint32_t max_size)
template<>
struct org::eclipse::cyclonedds::topic::lookup_topic<dds::topic::AnyTopic, org::eclipse::cyclonedds::topic::AnyTopicDelegate>

Public Static Functions

static inline dds::topic::AnyTopic discover(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const dds::core::Duration &timeout)
static inline void discover(const dds::domain::DomainParticipant &dp, std::vector<dds::topic::AnyTopic> &list, uint32_t max_size)
template<>
struct org::eclipse::cyclonedds::topic::lookup_topic<dds::topic::TopicDescription, org::eclipse::cyclonedds::topic::TopicDescriptionDelegate>

Public Static Functions

static inline dds::topic::TopicDescription discover(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const dds::core::Duration &timeout)
static inline void discover(const dds::domain::DomainParticipant &dp, std::vector<dds::topic::TopicDescription> &list, uint32_t max_size)
class dds::sub::DataReader::ManipulatorSelector
#include <DataReader.hpp>

The ManipulatorSelector class is used by the DataReader to compose streaming read operations.

A ManipulatorSelector can perform complex data selections, such as per-instance selection, content and status filtering, etc, when reading or taking samples through the streaming operator.

Convenience functors The following convenience functors use a ManipulatorSelector implicitly and can be used in the streaming operator:

  • dds::sub::read

  • dds::sub::take

  • dds::sub::max_samples

  • dds::sub::content

  • dds::sub::state

  • dds::sub::instance

  • dds::sub::next_instance

// Take a maximum of 3 new samples of a certain instance.
reader >> dds::sub::take
       >> dds::sub::max_samples(3)
       >> dds::sub::state(dds::sub::status::DataState::new_data())
       >> dds::sub::instance(someValidInstanceHandle)
       >> samples;
However, this will create and destroy ManipulatorSelectors and Functors for every read, which is not very performance friendly.

The performance can be increase by creating a ManipulatorSelector up front and doing the reading on that ManipulatorSelector directly and re-using it.

// Create a ManipulatorSelector as selective reader up front.
dds::sub::DataReader<Foo::Bar>::ManipulatorSelector selectiveReader(reader);
// Configure it to take a maximum of 3 new samples of a certain instance
selectiveReader.max_samples(3);
selectiveReader.state(dds::sub::status::DataState::new_data());
selectiveReader.instance(someValidInstanceHandle);
selectiveReader.read_mode(false); // take

// Use the configured ManipulatorSelector to -take- a maximum of 3 samples of a
// certain instance (which it was configured to do).
// This can be used in loops for example, reducing the need for creating
// implicit ManipulatorSelectors for every take.
selectiveReader >> samples;

Defaults

Element

Default Value

read_mode

true (read)

state

dds::sub::status::DataState::any

content

Empty dds::sub::Query

max_samples

dds::core::LENGTH_UNLIMITED

instance

dds::core::InstanceHandle nil

See

for more information: DataReader stream operator>>

Public Functions

ManipulatorSelector(DataReader &dr)

Construct a ManipulatorSelector for a DataReader.

See also DataReader stream operator>>

Parameters

DataReader

bool read_mode()

Get the read_mode.

The read_mode specifies if a sample should be read or taken:

  • true = read (default)

  • false = take

Returns

true if read_mode is set to read

void read_mode(bool readmode)

Set the read_mode.

The read_mode specifies if a sample should be read or taken:

  • true = read (default)

  • false = take

Convenience Functor: dds::sub::readConvenience Functor: dds::sub::take

Example Determine to read or take samples.

// No usage of ManipulatorSelector, means a read iso take as default.
reader >> samples;

// Implicit use of ManipulatorSelector
reader >> dds::sub::read >> samples;
reader >> dds::sub::take >> samples;

// Explicit use of ManipulatorSelector
dds::sub::DataReader<Foo::Bar>::ManipulatorSelector readingReader(reader);
readingReader.read_mode(true); // Read, which is already the default.
readingReader >> samples;

dds::sub::DataReader<Foo::Bar>::ManipulatorSelector takingReader(reader);
takingReader.read_mode(false); // Take.
takingReader >> samples;
See also DataReader stream operator>>

Parameters

readmode – the read mode of the DataReader

ManipulatorSelector &max_samples(uint32_t n)

Set max_samples to limit the number of sample to get during the read or take.

Convenience Functor: dds::sub::max_samples

Example Read a maximum of three samples.

// Implicit use of ManipulatorSelector
reader >> dds::sub::max_samples(3) >> samples;

// Explicit use of ManipulatorSelector
dds::sub::DataReader<Foo::Bar>::ManipulatorSelector selectiveReader(reader);
selectiveReader.max_samples(3);
selectiveReader >> samples;
See also DataReader stream operator>>

Parameters

n – maximum number of samples

ManipulatorSelector &instance(const dds::core::InstanceHandle &handle)

Set InstanceHandle to filter with during the read or take.

Convenience Functor: dds::sub::instance

Example Read only samples of the given instance.

dds::core::InstanceHandle hdl = someValidInstanceHandle;

// Implicit use of ManipulatorSelector
reader >> dds::sub::instance(hdl) >> samples;

// Explicit use of ManipulatorSelector
dds::sub::DataReader<Foo::Bar>::ManipulatorSelector selectiveReader(reader);
selectiveReader.instance(hdl);
selectiveReader >> samples;
See also DataReader stream operator>>

Parameters

handle – the InstanceHandle for the read/take

ManipulatorSelector &next_instance(const dds::core::InstanceHandle &handle)

Set next InstanceHandle to filter with during the read or take.

Convenience Functor: dds::sub::next_instance

Example Read all samples, instance by instance.

// Implicit use of ManipulatorSelector
{
    // Get sample(s) of first instance
    dds::core::InstanceHandle hdl; //nil
    reader >> dds::sub::next_instance(hdl) >> samples;
    while (samples.length() > 0) {
        // Handle the sample(s) of this instance (just the first one in this case)
        const dds::sub::Sample<Foo::Bar>& sample = *(samples.begin());
        // Get sample(s) of the next instance
        hdl = sample.info().instance_handle();
        reader >> dds::sub::next_instance(hdl) >> samples;
    }
}

// Explicit use of ManipulatorSelector
{
    // Get sample(s) of first instance
    dds::sub::DataReader<Foo::Bar>::ManipulatorSelector selectiveReader(reader);
    dds::core::InstanceHandle hdl; //nil
    selectiveReader.next_instance(hdl);
    selectiveReader >> samples;
    while (samples.length() > 0) {
        // Handle the sample(s) of this instance (just the first one in this case)
        const dds::sub::Sample<Foo::Bar>& sample = *(samples.begin());
        // Get sample(s) of the next instance
        hdl = sample.info().instance_handle();
        selectiveReader.next_instance(hdl);
        selectiveReader >> samples;
    }
}
See also DataReader stream operator>>

Parameters

handle – the ‘previous’ InstanceHandle associated with new the read/take

ManipulatorSelector &state(const dds::sub::status::DataState &state)

Set DataState to filter with during the read or take.

Convenience Functor: dds::sub::state

Example Read only new data.

// DataState to filter only new data
dds::sub::status::DataState newData = dds::sub::status::DataState::new_data();

// Implicit use of ManipulatorSelector
reader >> dds::sub::state(newData) >> samples;

// Explicit use of ManipulatorSelector
dds::sub::DataReader<Foo::Bar>::ManipulatorSelector selectiveReader(reader);
selectiveReader.state(newData);
selectiveReader.read() >> samples;
See also DataReader stream operator>>

Parameters

state – the required DataState of the samples

ManipulatorSelector &content(const dds::sub::Query &query)

Set Query to filter with during the read or take.

Convenience Functor: dds::sub::content

Example Read only samples that will be filtered according to the given dds::sub::Query.

// Assume data type has an element called long_1
dds::sub::Query query(reader, "long_1 > 1 and long_1 < 7");

// Implicit use of ManipulatorSelector
reader >> dds::sub::content(query) >> samples;

// Explicit use of ManipulatorSelector
dds::sub::DataReader<Foo::Bar>::ManipulatorSelector selectiveReader(reader);
selectiveReader.content(query);
selectiveReader >> read;
See also DataReader stream operator>>

Parameters

query – The Query to apply to a read/take

ManipulatorSelector &operator>>(dds::sub::LoanedSamples<T> &samples)

This operation works the same as the DataReader stream operator>> , except that it is performed on this ManipulatorSelector with possible filters set.

Throws
ManipulatorSelector & operator>> (ManipulatorSelector &(manipulator)(ManipulatorSelector &))

This operation works the same as the DataReader stream operator>> , except that it is performed on this ManipulatorSelector with possible filters set.

Throws
template<typename Functor>
ManipulatorSelector operator>>(Functor f)

This operation works the same as the DataReader stream operator>> , except that it is performed on this ManipulatorSelector with possible filters set.

Throws
template<typename Functor>
DataReader<T>::ManipulatorSelector operator>>(Functor f)

Private Members

DELEGATE<T>::ManipulatorSelector impl_
class dds::sub::detail::DataReader::ManipulatorSelector : public dds::sub::detail::DataReader<T>::Selector

Public Functions

ManipulatorSelector(typename DataReader<T>::ref_type dr)
bool read_mode()
void read_mode(bool b)
ManipulatorSelector &operator>>(dds::sub::LoanedSamples<T> &samples)

Private Members

bool read_mode_
class dds::core::xtypes::MapType : public dds::core::xtypes::CollectionType

Public Functions

MapType(const DyanmicType &key_type, const DynamicType &value_type)

Create an unbounded Map with the given key/value type.

MapType(const DyanmicType &key_type, const DynamicType &value_type, uint32_t bounds)

Create an bounded Map with the given key/value type.

const DyanmicType &key_type()
const DynamicType &value_type()
class MapType
class dds::sub::functors::detail::MaxSamplesManipulatorFunctor

Public Functions

inline MaxSamplesManipulatorFunctor(uint32_t n)
template<typename S>
inline void operator()(S &s)

Private Members

uint32_t n_
class dds::core::xtypes::MemberType : public dds::core::Reference
#include <MemberType.hpp>

This class represents a dynamic type member.

Public Functions

MemberType(const std::string &name, const dds::core::xtypes::DynamicType &type)
MemberType(const std::string &name, const dds::core::xtypes::DynamicType &type, const Annotation &annotation)
template<typename AnnotationIter>
MemberType(const std::string &name, const dds::core::xtypes::DynamicType &type, const AnnotationIter &begin, const AnnotationIter &end)
MemberType(const std::string &name, const dds::core::xtypes::DynamicType &type, const std::vector<Annotation> &annotations)
const std::string &name() const
const dds::core::xtypes::DynamicType &type() const
MemberType add_annotation(const Annotation &annotation)
MemberType remove_annotation(const Annotation &annotation)
class dds::core::xtypes::MustUnderstandAnnotation : public dds::core::xtypes::Annotation

Public Functions

MustUnderstandAnnotation()
class MustUnderstandAnnotation : public dds::core::xtypes::detail::Annotation
class org::eclipse::cyclonedds::core::Mutex

Public Functions

Mutex()
virtual ~Mutex()
void lock() const
bool try_lock() const
void unlock() const

Private Members

void *mtx
class dds::core::xtypes::NestedAnnotation : public dds::core::xtypes::Annotation

Public Functions

NestedAnnotation()
class NestedAnnotation : public dds::core::xtypes::detail::Annotation
class dds::sub::functors::detail::NextInstanceManipulatorFunctor

Public Functions

inline NextInstanceManipulatorFunctor(const dds::core::InstanceHandle &h)
template<typename S>
inline void operator()(S &s)

Private Members

dds::core::InstanceHandle handle_
class NoOpAnyDataReaderListener : public virtual dds::sub::AnyDataReaderListener
#include <AnyDataReaderListener.hpp>

AnyDataReader events Listener.

This listener is just like AnyDataReaderListener, except that the application doesn’t have to implement all operations.

This class is used as a base for other listeners and is not used on its own.

See

dds::sub::AnyDataReaderListener

See

dds::sub::NoOpSubscriberListener

See

dds::domain::NoOpDomainParticipantListener

Subclassed by dds::sub::NoOpSubscriberListener

class NoOpAnyDataWriterListener : public virtual dds::pub::AnyDataWriterListener
#include <AnyDataWriterListener.hpp>

AnyDataWriter events Listener.

This listener is just like AnyDataWriterListener, except that the application doesn’t have to implement all operations.

This class is used as a base for other listeners and is not used on its own.

See

dds::pub::AnyDataWriterListener

See

dds::pub::NoOpPublisherListener

See

dds::domain::NoOpDomainParticipantListener

Subclassed by dds::pub::NoOpPublisherListener

class org::eclipse::cyclonedds::topic::NoOpAnyTopicListener : public virtual org::eclipse::cyclonedds::topic::AnyTopicListener

Subclassed by org::eclipse::cyclonedds::domain::NoOpDomainParticipantListener

Public Functions

inline virtual ~NoOpAnyTopicListener()
class NoOpAnyTopicListener : public virtual dds::topic::AnyTopicListener
#include <AnyTopicListener.hpp>

AnyTopic events Listener.

This listener is just like AnyTopicListener, except that the application doesn’t have to implement all operations.

This class is used as a base for other listeners and is not used on its own.

See

dds::topic::AnyTopicListener

See

dds::domain::NoOpDomainParticipantListener

Subclassed by dds::domain::NoOpDomainParticipantListener

template<typename T>
class NoOpDataReaderListener
#include <DataReaderListener.hpp>

DataReader events Listener.

This listener is just like DataReaderListener, except that the application doesn’t have to implement all operations.

class ExampleListener : public virtual dds::sub::NoOpDataReaderListener<Foo::Bar>
{
   // Not necessary to implement any Listener operations.
};

See

dds::sub::DataReaderListener

template<typename T>
class NoOpDataWriterListener : public virtual dds::pub::DataWriterListener<T>
#include <DataWriterListener.hpp>

DataWriter events Listener.

This listener is just like DataWriterListener, except that the application doesn’t have to implement all operations.

class ExampleListener : public virtual dds::pub::NoOpDataWriterListener<Foo::Bar>
{
   // Not necessary to implement any Listener operations.
};

See

dds::pub::DataWriterListener

class NoOpDomainParticipantListener : public virtual dds::domain::DomainParticipantListener, public virtual dds::pub::NoOpPublisherListener, public virtual dds::sub::NoOpSubscriberListener, public virtual dds::topic::NoOpAnyTopicListener
#include <DomainParticipantListener.hpp>

DomainParticipant events Listener.

This listener is just like DomainParticipantListener, except that the application doesn’t have to implement all operations.

class ExampleListener :
               public virtual dds::domain::NoOpDomainParticipantListener
{
   // Not necessary to implement any Listener operations.
};

See

dds::domain::DomainParticipantListener

Subclassed by org::eclipse::cyclonedds::domain::NoOpDomainParticipantListener

class org::eclipse::cyclonedds::domain::NoOpDomainParticipantListener : public virtual dds::domain::NoOpDomainParticipantListener, public virtual org::eclipse::cyclonedds::topic::NoOpAnyTopicListener

Public Functions

inline virtual ~NoOpDomainParticipantListener()
class NoOpPublisherListener : public virtual dds::pub::PublisherListener, public virtual dds::pub::NoOpAnyDataWriterListener
#include <PublisherListener.hpp>

Publisher events Listener.

This listener is just like PublisherListener, except that the application doesn’t have to implement all operations.

class ExampleListener : public virtual dds::pub::NoOpPublisherListener
{
   // Not necessary to implement any Listener operations.
};

See

dds::pub::PublisherListener

Subclassed by dds::domain::NoOpDomainParticipantListener

class NoOpSubscriberListener : public virtual dds::sub::SubscriberListener, public virtual dds::sub::NoOpAnyDataReaderListener
#include <SubscriberListener.hpp>

Subscriber events Listener.

This listener is just like SubscriberListener, except that the application doesn’t have to implement all operations.

class ExampleListener : public virtual dds::sub::NoOpSubscriberListener
{
   // Not necessary to implement any Listener operations.
};

See

dds::sub::SubscriberListener

Subclassed by dds::domain::NoOpDomainParticipantListener

template<typename T>
class org::eclipse::cyclonedds::topic::NoOpTopicListener : public virtual org::eclipse::cyclonedds::topic::TopicListener<T>

Public Functions

inline virtual ~NoOpTopicListener()
inline virtual void on_inconsistent_topic(dds::topic::Topic<T>&, const dds::core::status::InconsistentTopicStatus&)

This operation is called by the Data Distribution Service when the InconsistentTopicStatus changes.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant TopicListener is installed and enabled with the StatusMask::inconsistent_topic(). The InconsistentTopicStatus will change when another Topic exists with the same topic_name but different characteristics.

Parameters
  • topic – contain a pointer to the Topic on which the conflict occurred (this is an input to the application).

  • status – contain the InconsistentTopicStatus object (this is an input to the application).

template<typename T>
class NoOpTopicListener : public virtual dds::topic::TopicListener<T>
#include <TopicListener.hpp>

Topic events Listener.

This listener is just like TopicListener, except that the application doesn’t have to implement all operations.

class ExampleListener : public virtual dds::topic::NoOpTopicListener<Foo::Bar>
{
   // Not necessary to implement any Listener operations.
};

See

dds::topic::TopicListener

class NotEnabledError : public dds::core::Exception, public logic_error
#include <Exception.hpp>

Exception: Operation invoked on an Entity that is not yet enabled.

class null_type
#include <types.hpp>

This class is used to create dds::core::null objects.

class NullReferenceError : public dds::core::Exception, public runtime_error
#include <Exception.hpp>

Exception: Application used a null reference.

Very likely, the used DDS object is a dds::core::null object.

dds::domain::DomainParticipant participant = dds::core::null;
try {
    participant.domain_id();
} catch (const dds::core::NullReferenceError& e) {
    std::cout << e.what() << std::endl;
}

class org::eclipse::cyclonedds::core::ObjectDelegate

Subclassed by org::eclipse::cyclonedds::core::DDScObjectDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<ObjectDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<ObjectDelegate>::weak_ref_type weak_ref_type

Public Functions

ObjectDelegate()
virtual ~ObjectDelegate()
virtual void close()
void lock() const
void unlock() const
virtual void init(ObjectDelegate::weak_ref_type weak_ref) = 0
ObjectDelegate::weak_ref_type get_weak_ref() const
ObjectDelegate::ref_type get_strong_ref() const

Protected Functions

void check() const
void set_weak_ref(ObjectDelegate::weak_ref_type weak_ref)

Protected Attributes

Mutex mutex
bool closed
ObjectDelegate::weak_ref_type myself
class org::eclipse::cyclonedds::core::ObjectSet

Public Types

typedef std::set<org::eclipse::cyclonedds::core::ObjectDelegate::weak_ref_type>::iterator setIterator
typedef std::vector<org::eclipse::cyclonedds::core::ObjectDelegate::weak_ref_type>::iterator vectorIterator
typedef std::vector<org::eclipse::cyclonedds::core::ObjectDelegate::weak_ref_type> vector

Public Functions

void insert(org::eclipse::cyclonedds::core::ObjectDelegate &obj)
void erase(org::eclipse::cyclonedds::core::ObjectDelegate &obj)
void all_close()
vector copy()

Private Members

WeakReferenceSet<ObjectDelegate::weak_ref_type>::wset objects
Mutex mutex
class dds::core::status::OfferedDeadlineMissedStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

OfferedDeadlineMissedStatus()
int32_t total_count() const
Returns

Total cumulative number of offered deadline periods elapsed during which a DataWriter failed to provide data. Missed deadlines accumulate; that is, each deadline period the total_count will be incremented by one.

int32_t total_count_change() const
Returns

The change in total_count since the last time the listener was called or the status was read.

const dds::core::InstanceHandle last_instance_handle() const
Returns

Handle to the last instance in the DataWriter for which an offered deadline was missed.

class org::eclipse::cyclonedds::core::OfferedDeadlineMissedStatusDelegate

Public Functions

inline OfferedDeadlineMissedStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline const dds::core::InstanceHandle last_instance_handle() const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline void last_instance_handle(dds::core::InstanceHandle last_instance_handle)
inline bool operator==(const OfferedDeadlineMissedStatusDelegate &other) const
inline void ddsc_status(const dds_offered_deadline_missed_status *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
dds::core::InstanceHandle last_instance_handle_
class dds::core::status::OfferedIncompatibleQosStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

OfferedIncompatibleQosStatus()
int32_t total_count() const
Returns

Total cumulative number of times the concerned DataWriter discovered a DataReader for the same Topic with a requested QoS that is incompatible with that offered by the DataWriter.

int32_t total_count_change() const
Returns

The change in total_count since the last time the listener was called or the status was read.

dds::core::policy::QosPolicyId last_policy_id() const
Returns

The PolicyId of one of the policies that was found to be incompatible the last time an incompatibility was detected.

const dds::core::policy::QosPolicyCountSeq policies() const
Returns

A list containing for each policy the total number of times that the concerned DataWriter discovered a DataReader for the same Topic with a requested QoS that is incompatible with that offered by the DataWriter.

const dds::core::policy::QosPolicyCountSeq &policies(dds::core::policy::QosPolicyCountSeq &dst) const
Parameters

dst – The destination QosPolicyCountSeq the policies will be returned to

Returns

A list containing for each policy the total number of times that the concerned DataWriter discovered a DataReader for the same Topic with a requested QoS that is incompatible with that offered by the DataWriter.

class org::eclipse::cyclonedds::core::OfferedIncompatibleQosStatusDelegate

Public Functions

inline OfferedIncompatibleQosStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline dds::core::policy::QosPolicyId last_policy_id() const
inline const dds::core::policy::QosPolicyCountSeq policies() const
inline const dds::core::policy::QosPolicyCountSeq &policies(dds::core::policy::QosPolicyCountSeq &dst) const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline void last_policy_id(dds::core::policy::QosPolicyId last_policy_id)
inline void set_policies(dds::core::policy::QosPolicyCountSeq policies)
inline bool operator==(const OfferedIncompatibleQosStatusDelegate &other) const
inline void ddsc_status(const dds_offered_incompatible_qos_status_t *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
dds::core::policy::QosPolicyId last_policy_id_
dds::core::policy::QosPolicyCountSeq policies_
template<typename T>
class dds::core::optional : public dds::core::Value
#include <Optional.hpp>

The optional class is used to wrap attributes annotated in the idl with the @optional annotation. This class provides a simple and safe way of accessing, setting and resetting the stored attribute.

IDL:

struct RadarTrack {
    string id;
    long x;
    long y;
    long z; //@Optional
};

C++ Representation:

class RadarTrack {
public:
    RadarTrack();
    RadarTrack(const std::string& id,
               int32_t x,
               int32_t y,
               int32_t z);
public:
    std::string& id() const;
    void id(const std::string& s);

    int32_t x() const;
    void x(int32_t v);

    int32_t y() const;
    void y(int32_t v);

    dds::core::optional<int32_t>& z() const;
    void z(int32_t v);
    void z(const dds::core::optional<int32_t>& z)
};

Public Functions

optional(const T &t)
bool is_set() const

Returns true only if the attribute is set.

void reset()

Reset the attribute.

const T &get() const

Get the attribute. An exception is thrown if the attribute is not set.

T &get()

Get the attribute. An exception is thrown if the attribute is not set.

class OutOfResourcesError : public dds::core::Exception, public runtime_error
#include <Exception.hpp>

Exception: Service ran out of the resources needed to complete the operation.

class org::eclipse::cyclonedds::core::policy::OwnershipDelegate

Public Functions

OwnershipDelegate(const OwnershipDelegate &other)
explicit OwnershipDelegate(dds::core::policy::OwnershipKind::Type kind)
OwnershipDelegate &operator=(const OwnershipDelegate &other) = default
void kind(dds::core::policy::OwnershipKind::Type kind)
dds::core::policy::OwnershipKind::Type kind() const
bool operator==(const OwnershipDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::policy::OwnershipKind::Type kind_
struct dds::core::policy::OwnershipKind

Public Types

enum Type

Values:

enumerator SHARED

The same instance can be written by multiple DataWriter objects. All updates will be made available to the DataReader objects. In other words it does not have a specific owner.

class dds::topic::ParticipantBuiltinTopicData : public dds::core::Value
#include <BuiltinTopic.hpp>

Class that contains information about available DomainParticipants within the system.

The DCPSParticipant topic communicates the existence of DomainParticipants by means of the ParticipantBuiltinTopicData datatype. Each ParticipantBuiltinTopicData sample in a Domain represents a DomainParticipant that participates in that Domain: a new ParticipantBuiltinTopicData instance is created when a newly-added DomainParticipant is enabled, and it is disposed when that DomainParticipant is deleted. An updated ParticipantBuiltinTopicData sample is written each time the DomainParticipant modifies its UserDataQosPolicy.

// Get builtin subscriber
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::sub::Subscriber builtinSubscriber = dds::sub::builtin_subscriber(participant);

// Get DCPSParticipant builtin reader (happy flow)
string name = "DCPSParticipant";
vector<dds::sub::DataReader<dds::topic::ParticipantBuiltinTopicData> > readersVector;
dds::sub::find<dds::sub::DataReader<dds::topic::ParticipantBuiltinTopicData>,
                      back_insert_iterator<vector<dds::sub::DataReader<dds::topic::ParticipantBuiltinTopicData> > > >(
          builtinSubscriber,
          name,
          back_inserter<vector<dds::sub::DataReader<dds::topic::ParticipantBuiltinTopicData> > >(readersVector));
dds::sub::DataReader<dds::topic::ParticipantBuiltinTopicData> builtinReader = readersVector[0];

// The builtinReader can now be used just as a normal dds::sub::DataReader to get
// dds::topic::ParticipantBuiltinTopicData samples.

See

for more information: DCPS_Builtin_Topics

See

for more information: DCPS_Builtin_Topics_ParticipantData

Public Functions

const dds::topic::BuiltinTopicKey &key() const

Globally unique identifier of the participant

const ::dds::core::policy::UserData &user_data() const

User-defined data attached to the participant via a QosPolicy

class org::eclipse::cyclonedds::topic::ParticipantBuiltinTopicDataDelegate

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline void key(const int32_t *key)
inline const ::dds::core::policy::UserData &user_data() const
inline void user_data(const dds_qos_t *policy)
inline bool operator==(const ParticipantBuiltinTopicDataDelegate &other) const

Protected Attributes

dds::topic::BuiltinTopicKey key_
::dds::core::policy::UserData user_data_
class dds::core::policy::Partition : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit Partition(const std::string &name = "")

Creates a Partition QoS instance

Parameters

name – partition name

explicit Partition(const dds::core::StringSeq &names)

Creates a Partition QoS instance

Parameters

names – a sequence containing multiple partition names

Partition(const Partition &other)

Copies a Partition QoS instance

Parameters

other – the Partition QoS instance to copy

Partition &operator=(const Partition &other) = default

Copies a Partition QoS instance

Parameters

other – the Partition QoS instance to copy

Returns

reference to the Partition QoS instance that was copied to

Partition &name(const std::string &name)

Sets the partition name

Parameters

name – the partition name

Partition &name(const dds::core::StringSeq &names)

Sets multiple partition names

Parameters

names – a sequence containing multiple partition names

const dds::core::StringSeq name() const

Gets the partition names

Returns

a sequence containing the partition names

class org::eclipse::cyclonedds::core::policy::PartitionDelegate

Public Functions

PartitionDelegate(const PartitionDelegate &other)
explicit PartitionDelegate(const std::string &partition)
explicit PartitionDelegate(const dds::core::StringSeq &partitions)
PartitionDelegate &operator=(const PartitionDelegate &other) = default
void name(const std::string &partition)
void name(const dds::core::StringSeq &partitions)
const dds::core::StringSeq &name() const
bool operator==(const PartitionDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::StringSeq name_
class PreconditionNotMetError : public dds::core::Exception, public logic_error
#include <Exception.hpp>

Exception: A pre-condition for the operation was not met.

class dds::core::policy::Presentation : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

Presentation(dds::core::policy::PresentationAccessScopeKind::Type access_scope = dds::core::policy::PresentationAccessScopeKind::INSTANCE, bool coherent_access = false, bool ordered_access = false)

Creates a Presentation QoS instance

Parameters
  • access_scope – the access_scope kind

  • coherent_access – the coherent_access setting

  • ordered_access – the ordered_access setting

Presentation(const Presentation &other)

Copies a Presentation QoS instance

Parameters

other – the Presentation QoS instance to copy

Presentation &operator=(const Presentation &other) = default

Copies a Presentation QoS instance

Parameters

other – the Presentation QoS instance to copy

Returns

reference to the Presentation QoS that was copied to

Presentation &access_scope(dds::core::policy::PresentationAccessScopeKind::Type access_scope)

Sets the access_scope kind

Parameters

access_scope – the access_scope kind

dds::core::policy::PresentationAccessScopeKind::Type access_scope() const

Gets the access_scope kind

Returns

the access_scope kind

Presentation &coherent_access(bool coherent_access)

Sets the coherent_access setting

Parameters

coherent_access – the coherent_access setting

bool coherent_access() const

Gets the coherent_access setting

Returns

the coherent_access setting

Presentation &ordered_access(bool ordered_access)

Sets the ordered_access setting

Parameters

ordered_access – the ordered_access setting

bool ordered_access() const

Gets the ordered_access setting

Returns

the ordered_access setting

Public Static Functions

static Presentation GroupAccessScope(bool coherent_access = false, bool ordered_access = false)
Parameters
  • coherent_access – the coherent_access setting

  • ordered_access – the ordered_access setting

Returns

a Presentation QoS instance with a GROUP access_score and coherent_access and ordered_access set to the specified values

static Presentation InstanceAccessScope(bool coherent_access = false, bool ordered_access = false)
Parameters
  • coherent_access – the coherent_access setting

  • ordered_access – the ordered_access setting

Returns

a Presentation QoS instance with a INSTANCE access_score and coherent_access and ordered_access set to the specified values

static Presentation TopicAccessScope(bool coherent_access = false, bool ordered_access = false)
Parameters
  • coherent_access – the coherent_access setting

  • ordered_access – the ordered_access setting

Returns

a Presentation QoS instance with a TOPIC access_score and coherent_access and ordered_access set to the specified values

struct dds::core::policy::PresentationAccessScopeKind

Public Types

enum Type

Values:

enumerator INSTANCE

Presentation Access Scope is per instance.

enumerator TOPIC

Presentation Access Scope is per topic.

class org::eclipse::cyclonedds::core::policy::PresentationDelegate

Public Functions

PresentationDelegate(const PresentationDelegate &other)
PresentationDelegate(dds::core::policy::PresentationAccessScopeKind::Type access_scope, bool coherent_access, bool ordered_access)
PresentationDelegate &operator=(const PresentationDelegate &other) = default
void access_scope(dds::core::policy::PresentationAccessScopeKind::Type as)
dds::core::policy::PresentationAccessScopeKind::Type access_scope() const
void coherent_access(bool on)
bool coherent_access() const
void ordered_access(bool on)
bool ordered_access() const
bool operator==(const PresentationDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::policy::PresentationAccessScopeKind::Type access_scope_
bool coherent_access_
bool ordered_access_
template<typename T>
class dds::core::xtypes::PrimitiveType

Public Functions

inline PrimitiveType()
class org::eclipse::cyclonedds::core::policy::ProductData : public dds::core::Value

Public Functions

inline ProductData()

Creates a ProductData QoS instance

inline ProductData(const std::string &name)

Creates a ProductData QoS instance

Parameters

name – the name

inline ProductData(const ProductData &other)

Copies a ProductData QoS instance

Parameters

other – the ProductData QoS instance to copy

inline ProductData &name(const std::string &name)

Sets the name

Parameters

name – the name to set

inline std::string name() const

Gets the name

Returns

the name

class dds::topic::PublicationBuiltinTopicData : public dds::core::Value
#include <BuiltinTopic.hpp>

Class that contains information about available DataWriters within the system.

The DCPSPublication topic communicates the existence of datawriters by means of the PublicationBuiltinTopicData datatype. Each PublicationBuiltinTopicData sample in a Domain represents a datawriter in that Domain: a new PublicationBuiltinTopicData instance is created when a newly-added DataWriter is enabled, and it is disposed when that DataWriter is deleted. An updated PublicationBuiltinTopicData sample is written each time the DataWriter (or the Publisher to which it belongs) modifies a QosPolicy that applies to the entities connected to it. Also will it be updated when the writer looses or regains its liveliness.

// Get builtin subscriber
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::sub::Subscriber builtinSubscriber = dds::sub::builtin_subscriber(participant);

// Get DCPSPublication builtin reader (happy flow)
string name = "DCPSPublication";
vector<dds::sub::DataReader<dds::topic::PublicationBuiltinTopicData> > readersVector;
dds::sub::find<dds::sub::DataReader<dds::topic::PublicationBuiltinTopicData>,
                      back_insert_iterator<vector<dds::sub::DataReader<dds::topic::PublicationBuiltinTopicData> > > >(
          builtinSubscriber,
          name,
          back_inserter<vector<dds::sub::DataReader<dds::topic::PublicationBuiltinTopicData> > >(readersVector));
dds::sub::DataReader<dds::topic::PublicationBuiltinTopicData> builtinReader = readersVector[0];

// The builtinReader can now be used just as a normal dds::sub::DataReader to get
// dds::topic::PublicationBuiltinTopicData samples.

See

for more information: DCPS_Builtin_Topics

See

for more information: DCPS_Builtin_Topics_PublicationData

Public Functions

const dds::topic::BuiltinTopicKey &key() const

Global unique identifier of the DataWriter

const dds::topic::BuiltinTopicKey &participant_key() const

Global unique identifier of the Participant to which the DataWriter belongs

const std::string &topic_name() const

Name of the Topic used by the DataWriter

const std::string &type_name() const

Type name of the Topic used by the DataWriter

const ::dds::core::policy::Durability &durability() const

QosPolicy attached to the DataWriter

const ::dds::core::policy::Deadline &deadline() const

QosPolicy attached to the DataWriter

const ::dds::core::policy::LatencyBudget &latency_budget() const

QosPolicy attached to the DataWriter

const ::dds::core::policy::Liveliness &liveliness() const

QosPolicy attached to the DataWriter

const ::dds::core::policy::Reliability &reliability() const

QosPolicy attached to the DataWriter

const ::dds::core::policy::Lifespan &lifespan() const

QosPolicy attached to the DataWriter

const ::dds::core::policy::UserData &user_data() const

QosPolicy attached to the DataWriter

const ::dds::core::policy::Ownership &ownership() const

QosPolicy attached to the DataWriter

const ::dds::core::policy::DestinationOrder &destination_order() const

QosPolicy attached to the DataWriter

const ::dds::core::policy::Presentation &presentation() const

QosPolicy attached to the Publisher to which the DataWriter belongs

const ::dds::core::policy::Partition &partition() const

QosPolicy attached to the Publisher to which the DataWriter belongs

const ::dds::core::policy::TopicData &topic_data() const

QosPolicy attached to the Publisher to which the DataWriter belongs

const ::dds::core::policy::GroupData &group_data() const

QosPolicy attached to the Publisher to which the DataWriter belongs

class org::eclipse::cyclonedds::topic::PublicationBuiltinTopicDataDelegate

Public Functions

inline PublicationBuiltinTopicDataDelegate()
inline const dds::topic::BuiltinTopicKey &key() const
inline void key(const int32_t *key)
inline const dds::topic::BuiltinTopicKey &participant_key() const
inline void participant_key(const int32_t *key)
inline const std::string &topic_name() const
inline void topic_name(const char *name)
inline const std::string &type_name() const
inline void type_name(const char *name)
inline const ::dds::core::policy::Durability &durability() const
inline void durability(const dds_qos_t *policy)
inline const ::dds::core::policy::Deadline &deadline() const
inline void deadline(const dds_qos_t *policy)
inline const ::dds::core::policy::LatencyBudget &latency_budget() const
inline void latency_budget(const dds_qos_t *policy)
inline const ::dds::core::policy::Liveliness &liveliness() const
inline void liveliness(const dds_qos_t *policy)
inline const ::dds::core::policy::Reliability &reliability() const
inline void reliability(const dds_qos_t *policy)
inline const ::dds::core::policy::Lifespan &lifespan() const
inline void lifespan(const dds_qos_t *policy)
inline const ::dds::core::policy::DestinationOrder &destination_order() const
inline void destination_order(const dds_qos_t *policy)
inline const ::dds::core::policy::Ownership &ownership() const
inline void ownership(const dds_qos_t *policy)
inline const ::dds::core::policy::Partition &partition() const
inline void partition(const dds_qos_t *policy)
inline const ::dds::core::policy::Presentation &presentation() const
inline void presentation(const dds_qos_t *policy)
inline const ::dds::core::policy::TopicData &topic_data() const
inline void topic_data(const dds_qos_t *policy)
inline const ::dds::core::policy::UserData &user_data() const
inline void user_data(const dds_qos_t *policy)
inline const ::dds::core::policy::GroupData &group_data() const
inline void group_data(const dds_qos_t *policy)
inline bool operator==(const PublicationBuiltinTopicDataDelegate &other) const

Public Members

dds::topic::BuiltinTopicKey key_
dds::topic::BuiltinTopicKey participant_key_
std::string topic_name_
std::string type_name_
::dds::core::policy::Durability durability_
::dds::core::policy::Deadline deadline_
::dds::core::policy::LatencyBudget latency_budget_
::dds::core::policy::Liveliness liveliness_
::dds::core::policy::Reliability reliability_
::dds::core::policy::Lifespan lifespan_
::dds::core::policy::UserData user_data_
::dds::core::policy::Ownership ownership_
::dds::core::policy::DestinationOrder destination_order_
::dds::core::policy::Presentation presentation_
::dds::core::policy::Partition partition_
::dds::core::policy::TopicData topic_data_
::dds::core::policy::GroupData group_data_
class dds::core::status::PublicationMatchedStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

PublicationMatchedStatus()
int32_t total_count() const
Returns

Total cumulative count the concerned DataWriter discovered a “match” with a DataReader. That is, it found a DataReader for the same Topic with a requested QoS that is compatible with that offered by the DataWriter.

int32_t total_count_change() const
Returns

The change in total_count since the last time the listener was called or the status was read.

int32_t current_count() const
Returns

The number of DataReaders currently matched to the concerned DataWriter.

int32_t current_count_change() const
Returns

The change in current_count since the last time the listener was called or the status was read.

const dds::core::InstanceHandle last_subscription_handle() const
Returns

Handle to the last DataReader that matched the DataWriter causing the status to change.

class org::eclipse::cyclonedds::core::PublicationMatchedStatusDelegate

Public Functions

inline PublicationMatchedStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline int32_t current_count() const
inline int32_t current_count_change() const
inline const dds::core::InstanceHandle last_subscription_handle() const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline void current_count(int32_t current_count)
inline void current_count_change(int32_t current_count_change)
inline void last_subscription_handle(dds::core::InstanceHandle last_subscription_handle)
inline bool operator==(const PublicationMatchedStatusDelegate &other) const
inline void ddsc_status(const dds_publication_matched_status_t *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
int32_t current_count_
int32_t current_count_change_
dds::core::InstanceHandle last_subscription_handle_
class dds::pub::Publisher : public dds::core::Entity
#include <Publisher.hpp>

The Publisher acts on the behalf of one or several DataWriter objects that belong to it.

When it is informed of a change to the data associated with one of its DataWriter objects, it decides when it is appropriate to actually send the data-update message. In making this decision, it considers any extra information that goes with the data (timestamp, writer, etc.) as well as the QoS of the Publisher and the DataWriter.

See

for more information: Publisher

Public Types

typedef dds::pub::PublisherListener Listener

Local convenience typedef for dds::pub::PublisherListener.

Public Functions

Publisher(const dds::domain::DomainParticipant &dp)

Create a new Publisher.

The Publisher will be created with the QoS values specified on the last successful call to dp.default_publisher_qos(qos) or, if the call was never made, the default values.

Parameters

dp – the domain participant

Throws
Publisher(const dds::domain::DomainParticipant &dp, const dds::pub::qos::PublisherQos &qos, dds::pub::PublisherListener *listener = NULL, const dds::core::status::StatusMask &mask = dds::core::status::StatusMask::none())

Create a new Publisher.

The Publisher will be created with the given QosPolicy settings and if applicable, attaches the optionally specified PublisherListener to it.

See listener for more information about listeners and possible status propagation to other entities.

Parameters
  • dp – the domain participant to create the Publisher with.

  • qos – a collection of QosPolicy settings for the new Publisher. In case these settings are not self consistent, no Publisher is created.

  • listener – the publisher listener

  • mask – the mask of events notified to the listener

Throws
const dds::pub::qos::PublisherQos &qos() const

Gets the PublisherQos setting for this instance.

Throws
Returns

the qos

void qos(const dds::pub::qos::PublisherQos &qos)

Sets the PublisherQos setting for this instance.

Parameters

qos – the qos

Throws
Publisher &operator<<(const dds::pub::qos::PublisherQos &qos)

Sets the PublisherQos setting for this instance.

Parameters

qos – the qos

Throws
Publisher &operator>>(dds::pub::qos::PublisherQos &qos)

Gets the PublisherQos setting for this instance.

Throws
Returns

the qos

Publisher &default_datawriter_qos(const dds::pub::qos::DataWriterQos &qos)

Sets the default DataWriterQos of the Publisher.

This operation sets the default SubscriberQos of the Publisher which is used for newly created Subscriber objects, when no QoS is provided.

This operation checks if the DataWriterQos is self consistent. If it is not, the operation has no effect and throws dds::core::InconsistentPolicyError.

The values set by this operation are returned by dds::pub::Publisher::default_datawriter_qos().

Parameters

qos – the default DataWriterQos

Throws
dds::pub::qos::DataWriterQos default_datawriter_qos() const

Gets the default DataWriterQos of the Publisher.

This operation gets an object with the default DataWriter QosPolicy settings of the Publisher (that is the DataWriterQos) which is used for newly created DataWriter objects, in case no QoS was provided during the creation.

The values retrieved by this operation match the set of values specified on the last successful call to dds::pub::Publisher::default_datawriter_qos(const dds::pub::qos::DataWriterQos& qos), or, if the call was never made, the default values.

Throws
Returns

the default DataWriterQos

void listener(Listener *plistener, const dds::core::status::StatusMask &mask)

Register a listener with the Publisher.

The notifications received by the listener depend on the status mask with which it was registered.

Listener un-registration is performed by setting the listener to NULL.

See also listener information.

Parameters
  • plistener – the listener

  • mask – the mask defining the events for which the listener will be notified.

Throws
Listener *listener() const

Get the listener of this Publisher.

See also listener information.

Throws

dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

Returns

the listener

void wait_for_acknowledgments(const dds::core::Duration &timeout)

This operation blocks the calling thread until either all data written by the reliable DataWriter entities is acknowledged by all matched reliable DataReader entities, or else the duration specified by the timeout parameter elapses, whichever happens first.

Data is acknowledged by the local infrastructure when it does not need to be stored in its DataWriter’s local history. When a locally-connected subscription (including the networking service) has no more resources to store incoming samples it will start to reject these samples, resulting in their source DataWriters to store them temporarily in their own local history to be retransmitted at a later moment in time.

In such scenarios, the wait_for_acknowledgments operation will block until all contained DataWriters have retransmitted their entire history, which is therefore effectively empty, or until the max_wait timeout expires, whichever happens first. In the latter case it will throw

dds::core::TimeoutError.

Be aware that in case the operation returns normally, the data has only been acknowledged by the local infrastructure: it does not mean all remote subscriptions have already received the data. However, delivering the data to remote nodes is then the sole responsibility of the networking service: even when the publishing application would terminate, all data that has not yet been received may be considered ‘on-route’ and will therefore eventually arrive (unless the networking service itself will crash). In contrast, if a DataWriter would still have data in it’s local history buffer when it terminates, this data is considered ‘lost’.

This operation is intended to be used only if one or more of the contained DataWriters has its ReliabilityQosPolicyKind set to RELIABLE. Otherwise the operation will return immediately, since best-effort DataWriters will never store rejected samples in their local history: they will just drop them and continue business as usual.

Parameters

timeout – the time out duration

Throws
const dds::domain::DomainParticipant &participant() const

Return the DomainParticipant that owns this Publisher.

Throws
Returns

the DomainParticipant

class org::eclipse::cyclonedds::pub::PublisherDelegate : public org::eclipse::cyclonedds::core::EntityDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<PublisherDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<PublisherDelegate>::weak_ref_type weak_ref_type

Public Functions

PublisherDelegate(const dds::domain::DomainParticipant &dp, const dds::pub::qos::PublisherQos &qos, dds::pub::PublisherListener *listener, const dds::core::status::StatusMask &event_mask)
virtual ~PublisherDelegate()
void init(ObjectDelegate::weak_ref_type weak_ref)
virtual void close()
const dds::pub::qos::PublisherQos &qos() const
void qos(const dds::pub::qos::PublisherQos &pqos)
void default_datawriter_qos(const dds::pub::qos::DataWriterQos &dwqos)
dds::pub::qos::DataWriterQos default_datawriter_qos() const
void suspend_publications()
void resume_publications()
void begin_coherent_changes()
void end_coherent_changes()
void wait_for_acknowledgments(const dds::core::Duration &max_wait)
void listener(dds::pub::PublisherListener *listener, const ::dds::core::status::StatusMask &mask)
dds::pub::PublisherListener *listener() const
const dds::domain::DomainParticipant &participant() const
bool contains_entity(const ::dds::core::InstanceHandle &handle)
void add_datawriter(org::eclipse::cyclonedds::core::EntityDelegate &datawriter)
void remove_datawriter(org::eclipse::cyclonedds::core::EntityDelegate &datawriter)
org::eclipse::cyclonedds::pub::AnyDataWriterDelegate::ref_type find_datawriter(const std::string &topic_name)
dds::pub::Publisher<PublisherDelegate> wrapper()
bool is_auto_enable() const
virtual void on_offered_deadline_missed(dds_entity_t writer, org::eclipse::cyclonedds::core::OfferedDeadlineMissedStatusDelegate &sd)
virtual void on_offered_incompatible_qos(dds_entity_t writer, org::eclipse::cyclonedds::core::OfferedIncompatibleQosStatusDelegate &sd)
virtual void on_liveliness_lost(dds_entity_t writer, org::eclipse::cyclonedds::core::LivelinessLostStatusDelegate &sd)
virtual void on_publication_matched(dds_entity_t writer, org::eclipse::cyclonedds::core::PublicationMatchedStatusDelegate &sd)

Private Members

dds::domain::DomainParticipant dp_
dds::pub::qos::PublisherQos qos_
dds::pub::qos::DataWriterQos default_dwqos_
org::eclipse::cyclonedds::core::EntitySet writers
class PublisherListener : public virtual dds::pub::AnyDataWriterListener
#include <PublisherListener.hpp>

Publisher events Listener.

Since a Publisher is an Entity, it has the ability to have a Listener associated with it. In this case, the associated Listener should be of type PublisherListener. This interface must be implemented by the application. A user-defined class must be provided by the application which must extend from the PublisherListener class.

The PublisherListener provides a generic mechanism (actually a callback function) for the Data Distribution Service to notify the application of relevant asynchronous status change events, such as a missed deadline, violation of a QosPolicy setting, etc. The PublisherListener is related to changes in communication status StatusConditions.

// Application example listener
class ExampleListener :
               public virtual dds::pub::PublisherListener
{
public:
    virtual void on_offered_deadline_missed (
        dds::pub::AnyDataWriter& writer,
        const dds::core::status::OfferedDeadlineMissedStatus& status)
    {
        std::cout << "on_offered_deadline_missed" << std::endl;
    }

    virtual void on_offered_incompatible_qos (
        dds::pub::AnyDataWriter& writer,
        const dds::core::status::OfferedIncompatibleQosStatus& status)
    {
        std::cout << "on_offered_incompatible_qos" << std::endl;
    }

    virtual void on_liveliness_lost (
        dds::pub::AnyDataWriter& writer,
        const dds::core::status::LivelinessLostStatus& status)
    {
        std::cout << "on_liveliness_lost" << std::endl;
    }

    virtual void on_publication_matched (
        dds::pub::AnyDataWriter& writer,
        const dds::core::status::PublicationMatchedStatus& status)
    {
        std::cout << "on_publication_matched" << std::endl;
    }
};

// Create Publisher with the listener
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::pub::Publisher publisher(participant,
                              participant.default_publisher_qos(),
                              new ExampleListener(),
                              dds::core::status::StatusMask::all());

See

for more information: Publisher

See

for more information: Listener information

Subclassed by dds::domain::DomainParticipantListener, dds::pub::NoOpPublisherListener

class dds::pub::qos::PublisherQos : public dds::core::EntityQos<org::eclipse::cyclonedds::pub::qos::PublisherQosDelegate>
#include <PublisherQos.hpp>

This object provides the basic mechanism for an application to specify Quality of Service attributes for a Publisher.

A QosPolicy can be set when the Publisher is created or modified with the set qos operation. Both operations take the PublisherQos object as a parameter. There may be cases where several policies are in conflict. Consistency checking is performed each time the policies are modified when they are being created and, in case they are already enabled, via the set qos operation.

Attributes

QosPolicy

Desciption

Default Value

dds::core::policy::Presentation

Data-instance change dependencies (info)

Presentation::InstanceAccessScope(coherent=false, ordered=false)

dds::core::policy::Partition

Active partitions (info)

Partition::Partition(empty)

dds::core::policy::GroupData

Additional information (info)

GroupData::GroupData(empty)

dds::core::policy::EntityFactory

Create enabled (info)

EntityFactory::AutoEnable()

Some QosPolicy have “immutable” semantics meaning that they can only be specified either at Publisher creation time or prior to calling the enable operation on the Publisher.

See

for more information: DCPS_QoS

Public Functions

inline PublisherQos()

Create default QoS.

PublisherQos(const PublisherQos &qos)

Create copied QoS type.

Parameters

qos – the QoS to copy policies from.

class org::eclipse::cyclonedds::pub::qos::PublisherQosDelegate

Public Functions

PublisherQosDelegate()
PublisherQosDelegate(const PublisherQosDelegate &other)
~PublisherQosDelegate()
void policy(const dds::core::policy::Presentation &presentation)
void policy(const dds::core::policy::Partition &partition)
void policy(const dds::core::policy::GroupData &gdata)
void policy(const dds::core::policy::EntityFactory &factory_policy)
template<typename POLICY>
const POLICY &policy() const
template<typename POLICY>
POLICY &policy()
dds_qos_t *ddsc_qos() const
void ddsc_qos(const dds_qos_t *qos)
void named_qos(const struct _DDS_NamedPublisherQos &qos)
void check() const
bool operator==(const PublisherQosDelegate &other) const
PublisherQosDelegate &operator=(const PublisherQosDelegate &other)
template<>
inline dds::core::policy::Presentation &policy()
template<>
inline dds::core::policy::Partition &policy()
template<>
inline dds::core::policy::GroupData &policy()
template<>
inline dds::core::policy::EntityFactory &policy()

Private Members

dds::core::policy::Presentation presentation_
dds::core::policy::Partition partition_
dds::core::policy::GroupData gdata_
dds::core::policy::EntityFactory factory_policy_
class dds::core::policy::QosPolicyCount : public dds::core::Value
#include <QosPolicyCount.hpp>

The QosPolicyCount object shows, for a QosPolicy, the total number of times that the concerned DataWriter discovered a DataReader for the same Topic and a requested DataReaderQos that is incompatible with the one offered by the DataWriter.

Public Functions

QosPolicyCount(QosPolicyId policy_id, int32_t count)

Creates a QosPolicyCount instance

Parameters
  • policy_id – the policy_id

  • count – the count

QosPolicyCount(const QosPolicyCount &other)

Copies a QosPolicyCount instance

Parameters

other – the QosPolicyCount instance to copy

QosPolicyCount &operator=(const QosPolicyCount &other) = default

Copies a QosPolicyCount instance

Parameters

other – the QosPolicyCount instance to copy

Returns

a reference to the QosPolicyCount that was copied to

QosPolicyId policy_id() const

Gets the policy_id

Returns

the policy_id

int32_t count() const

Gets the count

Returns

the count

class org::eclipse::cyclonedds::core::policy::QosPolicyCountDelegate

Public Functions

inline QosPolicyCountDelegate(dds::core::policy::QosPolicyId id, int32_t count)
inline QosPolicyCountDelegate(const QosPolicyCountDelegate &other)
QosPolicyCountDelegate &operator=(const QosPolicyCountDelegate &other) = default
inline dds::core::policy::QosPolicyId policy_id() const
inline void policy_id(dds::core::policy::QosPolicyId id)
inline int32_t count() const
inline void count(int32_t c)
inline bool operator==(const QosPolicyCountDelegate &other) const

Private Members

dds::core::policy::QosPolicyId policy_id_
int32_t count_
class dds::core::QosProvider : public dds::core::Reference
#include <QosProvider.hpp>

The QosProvider API allows users to specify the QoS settings of their DCPS entities outside of application code in XML.

The QosProvider is delivered as part of the DCPS API of Vortex OpenSplice.

See

for more information: QoS Provider extensive information.

Public Functions

explicit QosProvider(const std::string &uri, const std::string &profile)

Constructs a new QosProvider based on the provided uri and profile.

A QosProvider instance that is instantiated with all profiles and/or QoS’s loaded from the location specified by the provided uri.

Initialization of the QosProvider will fail under the following conditions:

  • No uri is provided.

  • The resource pointed to by uri cannot be found.

  • The content of the resource pointed to by uri is malformed (e.g., malformed XML). When initialization fails (for example, due to a parse error or when the resource identified by uri cannot be found), then PreconditionNotMetError will be thrown.

Look here for more information.

Parameters
  • uri – A Uniform Resource Identifier (URI) that points to the location where the QoS profile needs to be loaded from. Currently only URI’s with a ‘file’ scheme that point to an XML file are supported. If profiles and/or QoS settings are not uniquely identifiable by name within the resource pointed to by uri, a random one of them will be stored.

  • profile – The name of the QoS profile within the xml file that serves as the default QoS profile for the get qos operations.

Throws
explicit QosProvider(const std::string &uri)

Constructs a new QosProvider based on the provided uri.

A QosProvider instance that is instantiated with all profiles and/or QoS’s loaded from the location specified by the provided uri.

Initialization of the QosProvider will fail under the following conditions:

  • No uri is provided.

  • The resource pointed to by uri cannot be found.

  • The content of the resource pointed to by uri is malformed (e.g., malformed XML). When initialization fails (for example, due to a parse error or when the resource identified by uri cannot be found), then PreconditionNotMetError will be thrown.

Look here for more information.

Parameters

uri – A Uniform Resource Identifier (URI) that points to the location where the QoS profile needs to be loaded from. Currently only URI’s with a ‘file’ scheme that point to an XML file are supported. If profiles and/or QoS settings are not uniquely identifiable by name within the resource pointed to by uri, a random one of them will be stored.

Throws
dds::domain::qos::DomainParticipantQos participant_qos()

Resolves the DomainParticipantQos from the uri this QosProvider is associated with.

Throws
Returns

DomainParticipantQos from the given URI (and profile)

dds::domain::qos::DomainParticipantQos participant_qos(const std::string &id)

Resolves the DomainParticipantQos identified by the id from the uri this QosProvider is associated with.

Parameters

id – The fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.

Throws
Returns

DomainParticipantQos from the given URI (and profile) using the id

dds::topic::qos::TopicQos topic_qos()

Resolves the TopicQos from the uri this QosProvider is associated with.

Throws
Returns

TopicQos from the given URI (and profile)

dds::topic::qos::TopicQos topic_qos(const std::string &id)

Resolves the TopicQos identified by the id from the uri this QosProvider is associated with.

Parameters

id – The fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.

Throws
Returns

TopicQos from the given URI (and profile) using the id

dds::sub::qos::SubscriberQos subscriber_qos()

Resolves the SubscriberQos from the uri this QosProvider is associated with.

Throws
Returns

SubscriberQos from the given URI (and profile)

dds::sub::qos::SubscriberQos subscriber_qos(const std::string &id)

Resolves the SubscriberQos identified by the id from the uri this QosProvider is associated with.

Parameters

id – The fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.

Throws
Returns

SubscriberQos from the given URI (and profile) using the id

dds::sub::qos::DataReaderQos datareader_qos()

Resolves the DataReaderQos from the uri this QosProvider is associated with.

Throws
Returns

DataReadertQos from the given URI (and profile)

dds::sub::qos::DataReaderQos datareader_qos(const std::string &id)

Resolves the DataReaderQos identified by the id from the uri this QosProvider is associated with.

Parameters

id – The fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.

Throws
Returns

DataReaderQos from the given URI (and profile) using the id

dds::pub::qos::PublisherQos publisher_qos()

Resolves the PublisherQos from the uri this QosProvider is associated with.

Throws
Returns

PublisherQos from the given URI (and profile)

dds::pub::qos::PublisherQos publisher_qos(const std::string &id)

Resolves the PublisherQos identified by the id from the uri this QosProvider is associated with.

Parameters

id – The fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.

Throws
Returns

PublisherQos from the given URI (and profile) using the id

dds::pub::qos::DataWriterQos datawriter_qos()

Resolves the DataWriterQos from the uri this QosProvider is associated with.

Throws
Returns

DataWriterQos from the given URI (and profile)

dds::pub::qos::DataWriterQos datawriter_qos(const std::string &id)

Resolves the DataWriterQos identified by the id from the uri this QosProvider is associated with.

Parameters

id – The fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.

Throws
Returns

DataWriterQos from the given URI (and profile) using the id

class org::eclipse::cyclonedds::core::QosProviderDelegate

Public Functions

QosProviderDelegate(const std::string &uri, const std::string &id = "")
~QosProviderDelegate()
dds::domain::qos::DomainParticipantQos participant_qos(const char *id)
dds::topic::qos::TopicQos topic_qos(const char *id)
dds::sub::qos::SubscriberQos subscriber_qos(const char *id)
dds::sub::qos::DataReaderQos datareader_qos(const char *id)
dds::pub::qos::PublisherQos publisher_qos(const char *id)
dds::pub::qos::DataWriterQos datawriter_qos(const char *id)

Private Static Functions

template<typename FROM, typename TO>
static void named_qos__copyOut(void *from, void *to)
class dds::sub::Query : public virtual dds::core::Reference
#include <Query.hpp>

Query objects contain expressions that allow the application to specify a filter on the locally available data.

A Query is used in a QueryCondition or DataReader::Selector and is associated with one DataReader.

SQL Expression

The SQL query string is set by expression which must be a subset of the SQL query language. In this query expression, parameters may be used, which must be set in the sequence of strings defined by the parameter query_parameters. A parameter is a string which can define an integer, float, string or enumeration. The number of values in query_parameters must be equal or greater than the highest referenced n token in the query_expression (e.g. if %1 and %8 are used as parameters in the query_expression, the query_parameters should at least contain n+1 = 9 values).

Look here for the specific query expression syntax.

See

dds::sub::cond::QueryCondition

See

dds::sub::DataReader::Selector

See

dds::sub::DataReader::ManipulatorSelector

See

for more information: Subscription concept

Public Types

typedef DELEGATE::iterator iterator

Iterator for the query expression parameters.

typedef DELEGATE::const_iterator const_iterator

Iterator for the query expression parameters.

Public Functions

Query(const dds::sub::AnyDataReader &dr, const std::string &expression)

Create a dds::sub::Query associated with an dds::sub::AnyDataReader.

Parameters
Throws

dds::core::Exception

template<typename FWIterator>
Query(const dds::sub::AnyDataReader &dr, const std::string &expression, const FWIterator &params_begin, const FWIterator &params_end)

Create a dds::sub::Query associated with an dds::sub::AnyDataReader.

Parameters
  • dr – The AnyDataReader to associate with the Query.

  • expression – an SQL expression

  • params_begin – Iterator pointing to the beginning of the parameters to set

  • params_end – Iterator pointing to the end of the parameters to set

Throws

dds::core::Exception

Query(const dds::sub::AnyDataReader &dr, const std::string &expression, const std::vector<std::string> &params)

Create a dds::sub::Query associated with an dds::sub::AnyDataReader.

Parameters
Throws

dds::core::Exception

const std::string &expression() const

Get expression.

Throws

dds::core::Exception

Returns

std::string The SQL expression.

void expression(const std::string &expr)

Set new expression.

Parameters

expr – an ref anchor_dds_sub_query_expression “SQL expression”

Throws

dds::core::Exception

const_iterator begin() const

Provides the begin iterator to the SQL expression parameter list.

See SQL expression info

Throws

dds::core::Exception – Provides the begin iterator to the parameter list.

Returns

dds::sub::Query::const_iterator The begin iterator

const_iterator end() const

The end iterator to the SQL expression parameter list.

See SQL expression info

Throws

dds::core::Exception – The end iterator to the parameter list.

Returns

dds::sub::Query::const_iterator The end iterator

iterator begin()

Provides the begin iterator to the SQL expression parameter list.

See SQL expression info

Throws

dds::core::Exception

Returns

dds::sub::Query::iterator The begin iterator

iterator end()

The end iterator to the SQL expression parameter list.

See SQL expression info

Throws

dds::core::Exception

Returns

dds::sub::Query::iterator The end iterator

template<typename FWIterator>
void parameters(const FWIterator &begin, const FWIterator end)

Sets the query parameters.

See SQL expression info

Parameters
  • begin – Iterator pointing to the beginning of the parameters to set

  • end – Iterator pointing to the end of the parameters to set

Throws

dds::core::Exception

void add_parameter(const std::string &param)

Adds a parameter to the query.

See SQL expression info

Parameters

param – The parameter to add

Throws

dds::core::Exception

uint32_t parameters_length() const

Gets the number of parameters in the query.

See SQL expression info

Throws

dds::core::Exception

Returns

uint32_t The number of parameters in the query

const AnyDataReader &data_reader() const

This operation returns the DataReader associated with the Query.

Note that there is exactly one DataReader associated with each Query.

Throws

dds::core::Exception

Returns

dds::sub::AnyDataReader The associated DataReader

class org::eclipse::cyclonedds::sub::cond::QueryConditionDelegate : public org::eclipse::cyclonedds::sub::cond::ReadConditionDelegate

Public Types

typedef QueryDelegate::iterator iterator
typedef QueryDelegate::const_iterator const_iterator
typedef bool (*Filter_fn)(const void *sample)

Public Functions

QueryConditionDelegate(const dds::sub::AnyDataReader &dr, const std::string &query_expression, const dds::sub::status::DataState &state_filter)
QueryConditionDelegate(const dds::sub::AnyDataReader &dr, const std::string &expression, const std::vector<std::string> &params, const dds::sub::status::DataState &data_state)
QueryConditionDelegate(const dds::sub::AnyDataReader &dr, const dds::sub::status::DataState &data_state)
~QueryConditionDelegate()
void set_filter(Filter_fn filter)
Filter_fn get_filter()
void init(ObjectDelegate::weak_ref_type weak_ref)

Protected Attributes

Filter_fn cpp_filter

Protected Static Functions

static bool trans_filter(const void *csample, const void *ctx)
class org::eclipse::cyclonedds::sub::QueryDelegate : public virtual org::eclipse::cyclonedds::core::DDScObjectDelegate

Subclassed by org::eclipse::cyclonedds::sub::cond::ReadConditionDelegate

Public Types

typedef std::vector<std::string>::iterator iterator
typedef std::vector<std::string>::const_iterator const_iterator
typedef ::dds::core::smart_ptr_traits<QueryDelegate>::ref_type Ref
typedef ::dds::core::smart_ptr_traits<QueryDelegate>::weak_ref_type WeakRef

Public Functions

QueryDelegate(const dds::sub::AnyDataReader &dr, const dds::sub::status::DataState &state_filter = dds::sub::status::DataState::any())
QueryDelegate(const dds::sub::AnyDataReader &dr, const std::string &query_expression, const dds::sub::status::DataState &state_filter = dds::sub::status::DataState::any())
QueryDelegate(const dds::sub::AnyDataReader &dr, const std::string &query_expression, const std::vector<std::string> &params, const dds::sub::status::DataState &state_filter = dds::sub::status::DataState::any())
virtual ~QueryDelegate()
void init(ObjectDelegate::weak_ref_type weak_ref)
virtual void close()
const std::string &expression() const
void expression(const std::string &expr)
iterator begin()
iterator end()
const_iterator begin() const
const_iterator end() const
void add_parameter(const std::string &param)
uint32_t parameters_length() const
void parameters(const std::vector<std::string> &params)
std::vector<std::string> parameters()
void clear_parameters()
const dds::sub::AnyDataReader &data_reader() const
virtual void state_filter(dds::sub::status::DataState &s)
virtual dds::sub::status::DataState state_filter()
virtual bool modify_state_filter(dds::sub::status::DataState &s)
bool state_filter_equal(dds::sub::status::DataState &s)

Protected Functions

void deinit()

Private Members

dds::sub::AnyDataReader reader_
std::string expression_
std::vector<std::string> params_
dds::sub::status::DataState state_filter_
bool modified_
class dds::sub::Rank : public dds::core::Value
#include <Rank.hpp>

Class to hold sample Rank information and is part of dds::sub::SampleInfo.

The sample_rank and generation_rank available in dds::sub::Rank are computed based solely on the actual samples in the ordered collection returned by read or take.

  • The sample_rank indicates the number of samples of the same instance that follow the current one in the collection.

  • The generation_rank indicates the difference in ‘generations’ between the sample (S) and the Most Recent Sample of the same instance that appears In the returned Collection (MRSIC). That is, it counts the number of times the instance transitioned from not-alive to alive in the time from the reception of the S to the reception of MRSIC.

The generation_rank is computed using the formula:

generation_rank = (MRSIC.disposed_generation_count + MRSIC.no_writers_generation_count) - (S.disposed_generation_count + S.no_writers_generation_count)

The absolute_generation_rank indicates the difference in ‘generations’ between the sample (S) and the Most Recent Sample of the same instance that the middleware has received (MRS). That is, it counts the number of times the instance transitioned from not-alive to alive in the time from the reception of the S to the time when the read or take was called.

The absolute_generation_rank is computed using the formula:

absolute_generation_rank = (MRS.disposed_generation_count + MRS.no_writers_generation_count) - (S.disposed_generation_count + S.no_writers_generation_count)

See

for more information: SampleInfo

Public Functions

int32_t absolute_generation() const

Gets the absolute_generation_rank.

The absolute_generation_rank indicates the difference in ‘generations’ between the sample (S) and the Most Recent Sample of the same instance that the middleware has received (MRS). That is, it counts the number of times the instance transitioned from not-alive to alive in the time from the reception of the S to the time when the read or take was called.

The absolute_generation_rank is computed using the formula:

absolute_generation_rank = (MRS.disposed_generation_count + MRS.no_writers_generation_count) - (S.disposed_generation_count + S.no_writers_generation_count)

Returns

the absolute_generation_rank

inline int32_t generation() const

Gets the generation_rank.

The generation_rank indicates the difference in ‘generations’ between the sample (S) and the Most Recent Sample of the same instance that appears In the returned Collection (MRSIC). That is, it counts the number of times the instance transitioned from not-alive to alive in the time from the reception of the S to the reception of MRSIC.

The generation_rank is computed using the formula:

generation_rank = (MRSIC.disposed_generation_count + MRSIC.no_writers_generation_count) - (S.disposed_generation_count + S.no_writers_generation_count)

Returns

the generation_rank

inline int32_t sample() const

Gets the sample_rank.

The sample_rank indicates the number of samples of the same instance that follow the current one in the collection.

Returns

the sample_rank

class org::eclipse::cyclonedds::sub::RankImpl

Public Functions

inline RankImpl()
inline RankImpl(int32_t s, int32_t g, int32_t ag)
inline int32_t absolute_generation() const
inline int32_t generation() const
inline int32_t sample() const
inline bool operator==(const RankImpl &other) const

Private Members

int32_t s_
int32_t g_
int32_t ag_
class dds::sub::cond::ReadCondition : public dds::core::cond::Condition
#include <ReadCondition.hpp>

ReadCondition objects are conditions specifically dedicated to read operations and attached to one DataReader.

ReadCondition objects allow an application to specify the data samples it is interested in (by specifying the desired sample states, view states, and instance states). (See the parameter definitions for DataReader’s read/take operations.) This allows the middle-ware to enable the condition only when suitable information is available. They are to be used in conjunction with a WaitSet as normal conditions. More than one ReadCondition may be attached to the same DataReader.

See the WaitSet examples

for some examples.

Although the WaitSet examples use the StatusCondition, the basic usage of this Condition with a WaitSet is the same.

See

dds::core::cond::Condition

See

for more information: Status concept

See

for more information: WaitSet concept

See

for more information: Subscription concept

See

for more information: WaitSet examples

Public Functions

ReadCondition(const dds::sub::AnyDataReader &dr, const dds::sub::status::DataState &status)

Create a dds::sub::cond::ReadCondition associated with a DataReader.

The ReadCondition can then be added to a dds::core::cond::WaitSet so that the application can wait for specific status changes that affect the Entity.

State Masks.

The result of the

ReadCondition depends on the selection of samples determined by three masks:
  • DataState::sample_state() is the mask, which selects only those samples with the desired sample states SampleState::read(), SampleState::not_read() or SampleState::any().

  • DataState::view_state() is the mask, which selects only those samples with the desired view states ViewState::new_view(), ViewState::not_new_view() or ViewState::any().

  • DataState::instance_state() is the mask, which selects only those samples with the desired view states InstanceState::alive(), InstanceState::not_alive_disposed(), InstanceState::not_alive_no_writers(), InstanceState::not_alive_mask() or InstanceState::any(). See also Status Concept.

Parameters
  • dr – The DataReader to associate with the ReadCondition.

  • status – A mask, which selects only those samples with the desired sample/view/instance states.

Throws

dds::core::Exception

template<typename FUN>
ReadCondition(const dds::sub::AnyDataReader &dr, const dds::sub::status::DataState &status, FUN functor)

Create a dds::sub::cond::ReadCondition associated with a DataReader.

The ReadCondition can then be added to a dds::core::cond::WaitSet so that the application can wait for specific status changes that affect the Entity.

The supplied functor will be called when this ReadCondition is triggered and either the inherited dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this ReadCondition is attached to.

See State mask info.

Parameters
  • dr – The DataReader to associate with the ReadCondition.

  • status – A mask, which selects only those samples with the desired sample/view/instance states.

  • functor – The functor to be called when the ReadCondition triggers.

Throws

dds::core::Exception

const dds::sub::status::DataState state_filter() const

This operation returns the set of data-states that are taken into account to determine the trigger_value of the ReadCondition.

These are data-states specified when the ReadCondition was created.

Throws

dds::core::Exception

Returns

dds::sub::status::DataState The data state.

const dds::sub::AnyDataReader &data_reader() const

This operation returns the DataReader associated with the ReadCondition.

Note that there is exactly one DataReader associated with each ReadCondition.

Throws

dds::core::Exception

Returns

dds::sub::AnyDataReader The associated DataReader

class org::eclipse::cyclonedds::sub::cond::ReadConditionDelegate : public virtual org::eclipse::cyclonedds::core::cond::ConditionDelegate, public virtual org::eclipse::cyclonedds::sub::QueryDelegate

Subclassed by org::eclipse::cyclonedds::sub::cond::QueryConditionDelegate

Public Functions

ReadConditionDelegate(const dds::sub::AnyDataReader &dr, const dds::sub::status::DataState &state_filter)
~ReadConditionDelegate()
void init(ObjectDelegate::weak_ref_type weak_ref)
virtual void close()
virtual bool trigger_value() const
class dds::core::policy::ReaderDataLifecycle : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

ReaderDataLifecycle(const dds::core::Duration &autopurge_nowriter_samples_delay = dds::core::Duration::infinite(), const dds::core::Duration &autopurge_disposed_samples_delay = dds::core::Duration::infinite())

Creates a ReaderDataLifecycle QoS instance

Parameters
  • autopurge_nowriter_samples_delay – the autopurge nowriter samples delay

  • autopurge_disposed_samples_delay – the autopurge disposed samples delay

ReaderDataLifecycle(const ReaderDataLifecycle &other)

Copies a ReaderDataLifecycle QoS instance

Parameters

other – the ReaderDataLifecycle QoS instance to copy

ReaderDataLifecycle &operator=(const ReaderDataLifecycle &other) = default

Copies a ReaderDataLifecycle QoS instance

Parameters

other – the ReaderDataLifecycle QoS instance to copy

Returns

reference to the ReaderDataLifecycle QoS that was copied to

const dds::core::Duration autopurge_nowriter_samples_delay() const

Gets the autopurge nowriter samples delay

Returns

the autopurge nowriter samples delay

ReaderDataLifecycle &autopurge_nowriter_samples_delay(const dds::core::Duration &autopurge_nowriter_samples_delay)

Sets the autopurge nowriter samples delay

Parameters

autopurge_nowriter_samples_delay – the autopurge nowriter samples delay

const dds::core::Duration autopurge_disposed_samples_delay() const

Gets the autopurge_disposed_samples_delay

Returns

the autopurge disposed samples delay

ReaderDataLifecycle &autopurge_disposed_samples_delay(const dds::core::Duration &autopurge_disposed_samples_delay)

Sets the autopurge_disposed_samples_delay

Returns

the autopurge disposed samples delay

Public Static Functions

static ReaderDataLifecycle NoAutoPurgeDisposedSamples()
Returns

a ReaderDataLifecycle QoS instance which will not autopurge disposed samples

static ReaderDataLifecycle AutoPurgeDisposedSamples(const dds::core::Duration &autopurge_disposed_samples_delay)
Parameters

autopurge_disposed_samples_delay – the autopurge disposed samples delay

Returns

a ReaderDataLifecycle QoS instance with autopurge_disposed_samples_delay set to a specified value

class org::eclipse::cyclonedds::core::policy::ReaderDataLifecycleDelegate

Public Functions

ReaderDataLifecycleDelegate(const ReaderDataLifecycleDelegate &other)
ReaderDataLifecycleDelegate(const dds::core::Duration &nowriter_delay, const dds::core::Duration &disposed_samples_delay)
const dds::core::Duration autopurge_nowriter_samples_delay() const
void autopurge_nowriter_samples_delay(const dds::core::Duration &d)
const dds::core::Duration autopurge_disposed_samples_delay() const
void autopurge_disposed_samples_delay(const dds::core::Duration &d)
bool operator==(const ReaderDataLifecycleDelegate &other) const
ReaderDataLifecycleDelegate &operator=(const ReaderDataLifecycleDelegate &other) = default
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::Duration autopurge_nowriter_samples_delay_
dds::core::Duration autopurge_disposed_samples_delay_
class org::eclipse::cyclonedds::core::policy::ReaderLifespanDelegate

Public Functions

ReaderLifespanDelegate(const ReaderLifespanDelegate &other)
explicit ReaderLifespanDelegate(bool used, const dds::core::Duration &d)
void duration(const dds::core::Duration &d)
const dds::core::Duration duration() const
void used(bool v)
bool used() const
bool operator==(const ReaderLifespanDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

bool used_
dds::core::Duration duration_
template<typename READER, typename ITERATOR>
class dds::sub::detail::ReadersCopy

Public Static Functions

static inline uint32_t copy(base_readers_vector base_readers, ITERATOR begin, uint32_t max_size)
static inline uint32_t copy(base_readers_vector base_readers, ITERATOR begin)
template<typename READER, typename ITERATOR>
class dds::sub::detail::ReadersCopySpecialization

Public Static Functions

static inline bool copy(base_readers_iterator base_iter, ITERATOR typed_iter)
template<typename ITERATOR>
class dds::sub::detail::ReadersCopySpecialization<dds::sub::AnyDataReader, ITERATOR>

Public Static Functions

static inline bool copy(base_readers_iterator base_iter, ITERATOR any_iter)
class dds::core::Reference
#include <Reference.hpp>

Base class for reference-counted objects.

All objects that have a reference-type have an associated shallow (polymorphic) assignment operator that simply changes the value of the reference. Furthermore, reference-types are safe, meaning that under no circumstances can a reference point to an invalid object. At any single point in time a reference can either refer to the null object or to a valid object.

The semantics for Reference types is defined by the DDS-PSM-Cxx class dds::core::Reference. In the context of this specification the semantics implied by the ReferenceType is mandatory, yet the implementation supplied as part of this standard is provided to show one possible way of implementing this semantics.

List of reference types:

  • Entity

  • Condition

  • GuardCondition

  • ReadCondition

  • QueryCondition

  • Waitset

  • DomainParticipant

  • AnyDataWriter

  • Publisher

  • DataWriter

  • AnyDataReader

  • Subscriber

  • DataReader

  • SharedSamples

  • AnyTopic

  • Topic

Instances of reference types are created using C++ constructors. The trivial constructor is not defined for reference types; the only alternative to properly constructing a reference is to initialize it to a null reference by assigning dds::core::null.

Resource management for some reference types might involve relatively heavyweight operating-system resources (such as threads, mutexes, and network sockets) in addition to memory. These objects therefore provide a function close() that shall halt network communication (in the case of entities) and dispose of any appropriate operating-system resources.

Users of this PSM are recommended to call close on objects of all reference types once they are finished using them. In addition, implementations may automatically close objects that they deem to be no longer in use, subject to the following restrictions:

  • Any object to which the application has a direct reference (not including a WeakReference) is still in use.

  • Any object that has been explicitly retained is still in use.

  • The creator of any object that is still in use is itself still in use.

Subclassed by dds::core::cond::Condition, dds::core::cond::WaitSet, dds::core::Entity, dds::core::QosProvider, dds::core::xtypes::Annotation, dds::core::xtypes::DynamicData, dds::core::xtypes::MemberType, dds::core::xtypes::UnionCase< T >, dds::sub::Query, dds::topic::TopicDescription

Public Functions

explicit Reference(dds::core::null_type&)

Creates a “null” Reference.

explicit Reference(const Reference &ref)

Creates a Reference from another.

Parameters

ref – the other reference

explicit Reference(Reference &&ref)

Creates a Reference from another.

Parameters

ref – the other reference

explicit Reference(const Reference &ref)

Creates a Reference from other Reference type safely.

Parameters

ref – the other reference

~Reference()

Destroys a Reference.

There might be an associated garbage collection activity when the current reference is not empty. When the underlaying delegate is referenced by another Reference object as well, then that delegate will not be destroyed.

template<typename R>
bool operator==(const R &ref) const

Compares two Reference objects and returns true if they are equal.

Equality is based on the referential equality of the object being pointed.

Parameters

ref – the other Reference object

Returns

true when equal

template<typename R>
bool operator!=(const R &ref) const

Compares two Reference objects and returns true if they are not equal.

Inequality is based on the referential inequality of the object being pointed to.

Parameters

ref – the other Reference object

Returns

true when not equal

Reference &operator=(const Reference &that)

Assign new referenced object to this dds reference.

There might be an associated garbage collection activity when the current reference is not empty.

Returns

reference pointing to the new object.

template<typename R>
Reference &operator=(const R &rhs)

Assign new referenced object to this dds reference.

There might be an associated garbage collection activity when the current reference is not empty.

Returns

reference pointing to the new object.

Reference &operator=(const Reference &other) = default

Assign new referenced object to this dds reference.

There might be an associated garbage collection activity when the current reference is not empty.

Returns

reference pointing to the new object.

Reference &operator=(Reference &&other) = default

Assign new referenced object to this dds reference.

There might be an associated garbage collection activity when the current reference is not empty.

Returns

reference pointing to the new object.

Reference &operator=(const null_type)

Special assignment operators that takes care of assigning dds::core::null to this reference.

When assigning null, there might be an associated garbage collection activity.

Returns

reference pointing to a null object.

bool is_nil() const

Check if the referenced object is nil.

In other words, check if the reference is pointing to a null object.

Returns

true if the referenced object is null.

bool operator==(const null_type) const

Special operator== used to check if this reference object equals the dds::core::null reference.

The null-check can be done like this:

if (r == dds::core::null) {
   // Do not use the dds reference object r in its current state
}

Returns

true if this reference is null.

bool operator!=(const null_type nil) const

Special operator!= used to check if this reference object does not equal the dds::core::null reference.

The non-null-check can be done like this:

if (r != dds::core::null) {
   // Use the dds reference object r
}

Returns

true if this reference is not null.

DELEGATE *operator->()

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Reference and on all its subclasses as follows:

my_dds_entity.standard_function();
my_dds_entity->vendor_specific_extension();

Returns

a reference to delegate.

const DELEGATE *operator->() const

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Reference and on all its subclasses as follows:

my_dds_entity.standard_function();
my_dds_entity->vendor_specific_extension();

Returns

a reference to delegate.

template<typename R>
dds::core::Reference &operator=(const R &rhs)

Protected Functions

inline Reference()
void set_ref(DELEGATE_T *p)

Protected Attributes

DELEGATE_REF_T impl_

Private Functions

void *operator new(size_t)
class dds::core::policy::Reliability : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

Reliability(dds::core::policy::ReliabilityKind::Type kind = dds::core::policy::ReliabilityKind::BEST_EFFORT, const dds::core::Duration &max_blocking_time = dds::core::Duration::from_millisecs(100))

Creates a Reliability QoS instance

Parameters
  • kind – the kind

  • max_blocking_time – the max_blocking_time

Reliability(const Reliability &other)

Copies a Reliability QoS instance

Parameters

other – the Reliability QoS instance to copy

Reliability &operator=(const Reliability &other) = default

Copies a Reliability QoS instance

Parameters

other – the Reliability QoS instance to copy

Returns

reference to the Reliability QoS that was copied to

Reliability &kind(dds::core::policy::ReliabilityKind::Type kind)

Sets the kind

Parameters

kind – the kind

dds::core::policy::ReliabilityKind::Type kind() const

Gets the kind

Returns

the kind

Reliability &max_blocking_time(const dds::core::Duration &max_blocking_time)

Sets the max_blocking_time

Parameters

max_blocking_time – the max_blocking_time

const dds::core::Duration max_blocking_time() const

Gets the max_blocking_time

Returns

the max_blocking_time

Public Static Functions

static Reliability Reliable(const dds::core::Duration &max_blocking_time = dds::core::Duration::from_millisecs(100))
Parameters

max_blocking_time – the max blocking time

Returns

a Reliability QoS instance with the kind set to RELIABLE and the max_blocking_time set to the supplied value

static Reliability BestEffort(const dds::core::Duration &max_blocking_time = dds::core::Duration::from_millisecs(100))
Returns

a Reliability QoS instance with the kind set to BEST_EFFORT

class org::eclipse::cyclonedds::core::policy::ReliabilityDelegate

Public Functions

ReliabilityDelegate(const ReliabilityDelegate &other)
ReliabilityDelegate(dds::core::policy::ReliabilityKind::Type kind, const dds::core::Duration &max_blocking_time)
ReliabilityDelegate &operator=(const ReliabilityDelegate &other) = default
void kind(dds::core::policy::ReliabilityKind::Type kind)
dds::core::policy::ReliabilityKind::Type kind() const
void max_blocking_time(const dds::core::Duration &d)
const dds::core::Duration max_blocking_time() const
bool operator==(const ReliabilityDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::policy::ReliabilityKind::Type kind_
dds::core::Duration max_blocking_time_
struct dds::core::policy::ReliabilityKind

Public Types

enum Type

Values:

enumerator BEST_EFFORT

The Data Distribution Service will only attempt to deliver the data; no arrival-checks are being performed and any lost data is not re-transmitted (non-reliable). Presumably new values for the samples are generated often enough by the application so that it is not necessary to resent or acknowledge any samples.

enumerator RELIABLE

The Data Distribution Service will attempt to deliver all samples in the DataWriters history; arrival-checks are performed and data may get re-transmitted in case of lost data. In the steady-state (no modifications communicated via the DataWriter) the Data Distribution Service guarantees that all samples in the DataWriter history will eventually be delivered to the all DataReader objects. Outside the steady-state the HistoryQosPolicy and ResourceLimitsQosPolicy determine how samples become part of the history and whether samples can be discarded from it. In this case also the max_blocking_time must be set.

class dds::core::status::RequestedDeadlineMissedStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

RequestedDeadlineMissedStatus()
int32_t total_count() const
Returns

Total cumulative number of missed deadlines detected for any instance read by the DataReader. Missed deadlines accumulate; that is, each deadline period the total_count will be incremented by one for each instance for which data was not received.

int32_t total_count_change() const
Returns

The incremental number of deadlines detected since the last time the listener was called or the status was read.

const dds::core::InstanceHandle last_instance_handle() const
Returns

Handle to the last instance in the DataReader for which a deadline was detected.

class org::eclipse::cyclonedds::core::RequestedDeadlineMissedStatusDelegate

Public Functions

inline RequestedDeadlineMissedStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline const dds::core::InstanceHandle last_instance_handle() const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline void last_instance_handle(dds::core::InstanceHandle last_instance_handle)
inline bool operator==(const RequestedDeadlineMissedStatusDelegate &other) const
inline void ddsc_status(const dds_requested_deadline_missed_status_t *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
dds::core::InstanceHandle last_instance_handle_
class dds::core::status::RequestedIncompatibleQosStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

RequestedIncompatibleQosStatus()
int32_t total_count() const
Returns

Total cumulative number of times the concerned DataReader discovered a DataWriter for the same Topic with an offered QoS that was incompatible with that requested by the DataReader.

int32_t total_count_change() const
Returns

The change in total_count since the last time the listener was called or the status was read.

dds::core::policy::QosPolicyId last_policy_id() const
Returns

The QosPolicyId of one of the policies that was found to be incompatible the last time an incompatibility was detected.

const dds::core::policy::QosPolicyCountSeq policies() const
Returns

A list containing for each policy the total number of times that the concerned DataReader discovered a DataWriter for the same Topic with an offered QoS that is incompatible with that requested by the DataReader.

const dds::core::policy::QosPolicyCountSeq &policies(dds::core::policy::QosPolicyCountSeq &dst) const
Parameters

dst – The destination QosPolicyCountSeq the policies will be returned to

Returns

A list containing for each policy the total number of times that the concerned DataReader discovered a DataWriter for the same Topic with an offered QoS that is incompatible with that requested by the DataReader.

class org::eclipse::cyclonedds::core::RequestedIncompatibleQosStatusDelegate

Public Functions

inline RequestedIncompatibleQosStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline dds::core::policy::QosPolicyId last_policy_id() const
inline const dds::core::policy::QosPolicyCountSeq policies() const
inline const dds::core::policy::QosPolicyCountSeq &policies(dds::core::policy::QosPolicyCountSeq &dst) const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline void last_policy_id(dds::core::policy::QosPolicyId last_policy_id)
inline void set_policies(dds::core::policy::QosPolicyCountSeq policies)
inline bool operator==(const RequestedIncompatibleQosStatusDelegate &other) const
inline void ddsc_status(const dds_requested_incompatible_qos_status_t *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
dds::core::policy::QosPolicyId last_policy_id_
dds::core::policy::QosPolicyCountSeq policies_
class dds::core::policy::ResourceLimits : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

ResourceLimits(int32_t max_samples = dds::core::LENGTH_UNLIMITED, int32_t max_instances = dds::core::LENGTH_UNLIMITED, int32_t max_samples_per_instance = dds::core::LENGTH_UNLIMITED)

Creates a ResourceLimits QoS instance

Parameters
  • max_samples – the max_samples value

  • max_instances – the max_instances value

  • max_samples_per_instance – the max_samples_per_instance value

ResourceLimits(const ResourceLimits &other)

Copies a ResourceLimits QoS instance

Parameters

other – the ResourceLimits QoS instance to copy

ResourceLimits &operator=(const ResourceLimits &other) = default

Copies a ResourceLimits QoS instance

Parameters

other – the ResourceLimits QoS instance to copy

Returns

reference to the ResourceLimits QoS that was copied to

ResourceLimits &max_samples(int32_t max_samples)

Sets the max_samples value

Parameters

max_samples – the max_samples value

int32_t max_samples() const

Gets the max_samples value

Returns

the max_samples value

ResourceLimits &max_instances(int32_t max_instances)

Sets the max_instances value

Parameters

max_instances – the max_instances value

int32_t max_instances() const

Gets the max_instances value

Returns

the max_instances value

ResourceLimits &max_samples_per_instance(int32_t max_samples_per_instance)

Sets the max_samples_per_instance value

Parameters

max_samples_per_instance – the max_samples_per_instance value

int32_t max_samples_per_instance() const

Gets the max_samples_per_instance value

Returns

the max_samples_per_instance value

class org::eclipse::cyclonedds::core::policy::ResourceLimitsDelegate

Public Functions

ResourceLimitsDelegate(const ResourceLimitsDelegate &other)
ResourceLimitsDelegate(int32_t max_samples, int32_t max_instances, int32_t max_samples_per_instance)
ResourceLimitsDelegate &operator=(const ResourceLimitsDelegate &other) = default
void max_samples(int32_t samples)
int32_t max_samples() const
void max_instances(int32_t max_instances)
int32_t max_instances() const
void max_samples_per_instance(int32_t max_samples_per_instance)
int32_t max_samples_per_instance() const
bool operator==(const ResourceLimitsDelegate &other) const
void check() const
void check_against(const org::eclipse::cyclonedds::core::policy::HistoryDelegate &history) const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

int32_t max_samples_
int32_t max_instances_
int32_t max_samples_per_instance_
template<typename def, typename inner = typename def::Type>
class dds::core::safe_enum : public def
#include <SafeEnumeration.hpp>

safe_enum provides a wrapper for enumerated types in a typesafe manner.

safe_enums allow specification of the underlying type, do not implictly convert to integers, and resolve scoping issues.

Public Functions

inline safe_enum(type v)
inline inner underlying() const
inline bool operator==(const safe_enum &s) const
inline bool operator!=(const safe_enum &s) const
inline bool operator<(const safe_enum &s) const
inline bool operator<=(const safe_enum &s) const
inline bool operator>(const safe_enum &s) const
inline bool operator>=(const safe_enum &s) const

Private Types

typedef def::Type type

Private Members

inner val
template<typename T>
class dds::sub::detail::Sample

Public Functions

inline Sample()
inline Sample(const T &d, const dds::sub::SampleInfo &i)
inline Sample(const Sample &other)
inline Sample &operator=(const Sample &other)
inline Sample &copy(const Sample &other)
inline const T &data() const
inline T &data()
inline void data(const T &d)
inline const dds::sub::SampleInfo &info() const
inline dds::sub::SampleInfo &info()
inline void info(const dds::sub::SampleInfo &i)
inline bool operator==(const Sample &other) const
inline T *data_ptr()

Private Members

T data_
dds::sub::SampleInfo info_
template<typename T>
class dds::sub::Sample
#include <Sample.hpp>

This class encapsulates the data and info meta-data associated with DDS samples.

It is normally used with dds::sub::LoanedSamples:

dds::sub::LoanedSamples<Foo::Bar> samples = reader.read();
dds::sub::LoanedSamples<Foo::Bar>::const_iterator it;
for (it = samples.begin(); it != samples.end(); ++it) {
    const dds::sub::Sample<Foo::Bar>& sample = *it;
    const Foo::Bar& data = sample.data();
    const dds::sub::SampleInfo& info = sample.info();
    // Use sample data and meta information.
}
Or more implicitly:
dds::sub::LoanedSamples<Foo::Bar> samples = reader.read();
dds::sub::LoanedSamples<Foo::Bar>::const_iterator it;
for (it = samples.begin(); it != samples.end(); ++it) {
    const Foo::Bar& data = it->data();
    const dds::sub::SampleInfo& info = it->info();
    // Use sample data and meta information.
}

See

for more information: DataSample

See

for more information: SampleInfo

See

for more information: Subscription

Public Types

typedef T DataType

Convenience typedef for the type of the data sample.

Public Functions

Sample()

Create a sample with invalid data.

Sample(const T &data, const SampleInfo &info)

Creates a Sample instance.

Parameters
  • data – the data

  • info – the sample info

Sample(const Sample &other)

Copies a sample instance.

Parameters

other – the sample instance to copy

const DataType &data() const

Gets the data.

Returns

the data

void data(const DataType &data)

Sets the data.

Parameters

data – the data

const SampleInfo &info() const

Gets the info.

Returns

the info

void info(const SampleInfo &info)

Sets the info.

Parameters

info – the info

class dds::sub::SampleInfo : public dds::core::Value
#include <SampleInfo.hpp>

The SampleInfo contains information pertaining to the associated Data value.

The SampleInfo contains information pertaining to the associated Data value:

  • The data state (dds::sub::status::DataState).

    • The sample_state of the Data value (i.e., if the sample has already been READ or NOT_READ by that same DataReader).

    • The view_state of the related instance (i.e., if the instance is NEW, or NOT_NEW for that DataReader).

    • The instance_state of the related instance (i.e., if the instance is ALIVE, NOT_ALIVE_DISPOSED, or NOT_ALIVE_NO_WRITERS).

  • The valid data flag. This flag indicates whether there is data associated with the sample. Some samples do not contain data indicating only a change on the instance_state of the corresponding instance.

  • The generation counts (dds::sub::GenerationCount) for the related instance at the time the sample was received. These counters indicate the number of times the instance had become ALIVE.

    • The disposed generation count

    • The no_writer generation count

  • The rank information (dds::sub::Rank).

    • The sample rank. This rank provides a preview of the samples that follow within the sequence returned by the read or take operations.

    • The generation rank. This rank provides a preview of the samples that follow within the sequence returned by the read or take operations.

    • The absolute_generation rank. This is the timestamp provided by the DataWriter at the time the sample was produced.

  • The source timestamp of the sample. This is the timestamp provided by the DataWriter at the time the sample was produced.

  • The InstanceHandle of the associated data Sample.

  • The InstanceHandle of the associated publication.

See

for more information: SampleInfo

Public Functions

const dds::core::Time timestamp() const

Gets the timestamp of the sample.

This is the timestamp provided by the DataWriter at the time the sample was produced.

Returns

the timestamp

const dds::sub::status::DataState state() const

Gets the DataState of the sample.

The data state (dds::sub::status::DataState).

  • The sample_state of the Data value (i.e., if the sample has already been READ or NOT_READ by that same DataReader).

  • The view_state of the related instance (i.e., if the instance is NEW, or NOT_NEW for that DataReader).

  • The instance_state of the related instance (i.e., if the instance is ALIVE, NOT_ALIVE_DISPOSED, or NOT_ALIVE_NO_WRITERS).

Returns

the DataState

dds::sub::GenerationCount generation_count() const

Gets the GenerationCount of the sample.

The generation counts (dds::sub::GenerationCount) for the related instance at the time the sample was received. These counters indicate the number of times the instance had become ALIVE.

  • The disposed generation count

  • The no_writer generation count

Returns

the GenerationCount

dds::sub::Rank rank() const

Gets the Rank of the sample.

The rank information (dds::sub::Rank).

  • The sample rank. This rank provides a preview of the samples that follow within the sequence returned by the read or take operations.

  • The generation rank. This rank provides a preview of the samples that follow within the sequence returned by the read or take operations.

  • The absolute_generation rank. This is the timestamp provided by the DataWriter at the time the sample was produced.

Returns

the Rank

bool valid() const

Gets the valid_data flag.

This flag indicates whether there is data associated with the sample. Some samples do not contain data, indicating only a change on the instance_state of the corresponding instance.

Returns

the valid_data flag

dds::core::InstanceHandle instance_handle() const

Gets the InstanceHandle of the associated data Sample.

Returns

the InstanceHandle of the sample

dds::core::InstanceHandle publication_handle() const

Gets the InstanceHandle of the associated publication.

Returns

the publication_handle

class org::eclipse::cyclonedds::sub::SampleInfoImpl

Public Functions

inline SampleInfoImpl()
inline const dds::core::Time timestamp() const
inline void timestamp(const dds::core::Time &t)
inline const dds::sub::status::DataState state() const
inline void state(const dds::sub::status::DataState &s)
inline dds::sub::GenerationCount generation_count() const
inline void generation_count(dds::sub::GenerationCount &c)
inline dds::sub::Rank rank() const
inline void rank(dds::sub::Rank &r)
inline bool valid() const
inline void valid(bool v)
inline dds::core::InstanceHandle instance_handle() const
inline void instance_handle(dds::core::InstanceHandle &h)
inline dds::core::InstanceHandle publication_handle() const
inline void publication_handle(dds::core::InstanceHandle &h)
inline bool operator==(const SampleInfoImpl &other) const

Private Members

dds::core::Time source_timestamp_
dds::sub::status::DataState state_
dds::sub::GenerationCount generation_count_
dds::sub::Rank rank_
bool valid_
dds::core::InstanceHandle instance_handle_
dds::core::InstanceHandle publication_handle_

Private Static Functions

static inline bool state_is_equal(const dds::sub::status::DataState &s1, const dds::sub::status::DataState &s2)
class dds::core::status::SampleLostStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

SampleLostStatus()
int32_t total_count() const
Returns

Total cumulative count of all samples lost across of instances of data published under the Topic.

int32_t total_count_change() const
Returns

The incremental number of samples lost since the last time the listener was called or the status was read.

class org::eclipse::cyclonedds::core::SampleLostStatusDelegate

Public Functions

inline SampleLostStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline bool operator==(const SampleLostStatusDelegate &other) const
inline void ddsc_status(const dds_sample_lost_status_t *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
template<typename T>
class dds::sub::SampleRef
#include <SampleRef.hpp>

This class encapsulates a reference to the data and info meta-data associated with DDS samples.

It is normally used with dds::sub::LoanedSamples:

dds::sub::LoanedSamples<Foo::Bar> samples = reader.read();
dds::sub::LoanedSamples<Foo::Bar>::const_iterator it;
for (it = samples.begin(); it != samples.end(); ++it) {
    const dds::sub::Sample<Foo::Bar>& sample = *it;
    const Foo::Bar& data = sample.data();
    const dds::sub::SampleInfo& info = sample.info();
    // Use sample data and meta information.
}
Or more implicitly:
dds::sub::LoanedSamples<Foo::Bar> samples = reader.read();
dds::sub::LoanedSamples<Foo::Bar>::const_iterator it;
for (it = samples.begin(); it != samples.end(); ++it) {
    const Foo::Bar& data = it->data();
    const dds::sub::SampleInfo& info = it->info();
    // Use sample data and meta information.
}

See

for more information: DataSample

See

for more information: SampleInfo

See

for more information: Subscription

Public Types

typedef T DataType

Convenience typedef for the type of the data sample.

Public Functions

SampleRef()

Create a sample with invalid data.

SampleRef(const T &data, const SampleInfo &info)

Creates a Sample instance.

Parameters
  • data – the data

  • info – the sample info

SampleRef(const SampleRef &other)

Copies a sample instance.

Parameters

other – the sample instance to copy

const DataType &data() const

Gets the data.

Returns

the data

const SampleInfo &info() const

Gets the info.

Returns

the info

template<typename T>
class dds::sub::detail::SampleRef

Public Functions

inline SampleRef()
inline SampleRef(ddscxx_serdata<T> *d, const dds::sub::SampleInfo &i)
inline SampleRef(const SampleRef &other)
inline virtual ~SampleRef()
inline SampleRef &operator=(const SampleRef &other)
inline const T &data() const
inline const dds::sub::SampleInfo &info() const
inline dds::sub::SampleInfo &info()
inline bool operator==(const SampleRef &other) const
inline ddscxx_serdata<T> *&data_ptr()

Private Functions

inline void copy(const SampleRef &other)

Private Members

ddscxx_serdata<T> *data_
dds::sub::SampleInfo info_
class dds::core::status::SampleRejectedState : public std::bitset<OMG_DDS_STATE_BIT_COUNT>
#include <State.hpp>

Class to contain the statistics about samples that have been rejected.

See

for more information: SampleInfo

Public Types

typedef std::bitset<OMG_DDS_STATE_BIT_COUNT> MaskType

Convenience typedef for std::bitset<OMG_DDS_STATE_BIT_COUNT>.

Public Functions

SampleRejectedState()

Construct an empty SampleRejectedState.

SampleRejectedState(const SampleRejectedState &src)

Copy constructor.

Construct an SampleRejectedState with existing SampleRejectedState.

Parameters

src – the SampleRejectedState to copy from

SampleRejectedState(const MaskType &src)

Construct a SampleRejectedState with existing MaskType.

Parameters

src – the MaskType to copy from

SampleRejectedState &operator=(const SampleRejectedState&) = default

Copy assignment operator.

Copies the data from src to the current instance.

Parameters

src – the SampleRejectedState to copy from

Returns

reference to the SampleRejectedState that was copied to

Public Static Functions

static inline SampleRejectedState not_rejected()

Get the NOT_REJECTED.

not_rejected

  • No sample has been rejected yet.

Returns

the not_rejected SampleRejectedState

static inline SampleRejectedState rejected_by_samples_limit()

Get the REJECTED_BY_SAMPLES_LIMIT.

rejected_by_samples_limit

  • The sample was rejected because it would exceed the maximum number of samples set by the ResourceLimits QosPolicy.

Returns

the rejected_by_samples_limit SampleRejectedState

static inline SampleRejectedState rejected_by_instances_limit()

Get the REJECTED_BY_INSTANCES_LIMIT.

rejected_by_instances_limit

  • The sample was rejected because it would exceed the maximum number of instances set by the ResourceLimits QosPolicy.

Returns

the rejected_by_instances_limit SampleRejectedState

static inline SampleRejectedState rejected_by_samples_per_instance_limit()

Get the REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT.

rejected_by_samples_per_instance_limit

  • The sample was rejected because it would exceed the maximum number of samples per instance set by the ResourceLimits QosPolicy.

Returns

the rejected_by_samples_per_instance_limit SampleRejectedState

Private Functions

SampleRejectedState(uint32_t s)
class dds::core::status::SampleRejectedStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

SampleRejectedStatus()
int32_t total_count() const
Returns

Total cumulative count of samples rejected by the DataReader.

int32_t total_count_change() const
Returns

The incremental number of samples rejected since the last time the listener was called or the status was read.

const dds::core::status::SampleRejectedState last_reason() const
Returns

Reason for rejecting the last sample rejected. If no samples have been rejected, the reason is the special value NOT_REJECTED.

const dds::core::InstanceHandle last_instance_handle() const
Returns

Handle to the instance being updated by the last sample that was rejected.

class org::eclipse::cyclonedds::core::SampleRejectedStatusDelegate

Public Functions

inline SampleRejectedStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline dds::core::status::SampleRejectedState last_reason() const
inline const dds::core::InstanceHandle last_instance_handle() const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline void last_reason(dds::core::status::SampleRejectedState last_reason)
inline void last_instance_handle(dds::core::InstanceHandle last_instance_handle)
inline bool operator==(const SampleRejectedStatusDelegate &other) const
inline void ddsc_status(const dds_sample_rejected_status_t *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
dds::core::status::SampleRejectedState last_reason_
dds::core::InstanceHandle last_instance_handle_
template<typename T, typename SamplesBIIterator>
class dds::sub::detail::SamplesBIIteratorHolder : public dds::sub::detail::SamplesHolder

Public Functions

inline SamplesBIIteratorHolder(SamplesBIIterator &it)
inline virtual void set_length(uint32_t len)
inline virtual uint32_t get_length() const
inline virtual SamplesHolder &operator++(int)
inline virtual void *data()
inline virtual detail::SampleInfo &info()
inline virtual void **cpp_sample_pointers(size_t length)
inline virtual dds_sample_info_t *cpp_info_pointers(size_t length)
inline virtual void set_sample_contents(void**, dds_sample_info_t *info)
inline virtual void fini_samples_buffers(void **&c_sample_pointers, dds_sample_info_t *&c_sample_infos)

Private Members

SamplesBIIterator &iterator
std::vector<dds::sub::Sample<T, dds::sub::detail::Sample>> samples
uint32_t size
template<typename T, typename SamplesFWIterator>
class dds::sub::detail::SamplesFWInteratorHolder : public dds::sub::detail::SamplesHolder

Public Functions

inline SamplesFWInteratorHolder(SamplesFWIterator &it)
inline virtual void set_length(uint32_t len)
inline virtual uint32_t get_length() const
inline virtual SamplesHolder &operator++(int)
inline virtual void *data()
inline virtual detail::SampleInfo &info()
inline virtual void **cpp_sample_pointers(size_t length)
inline virtual dds_sample_info_t *cpp_info_pointers(size_t length)
inline virtual void set_sample_contents(void**, dds_sample_info_t *info)
inline virtual void fini_samples_buffers(void **&c_sample_pointers, dds_sample_info_t *&c_sample_infos)

Private Members

SamplesFWIterator &iterator
uint32_t size
class dds::sub::detail::SamplesHolder

Subclassed by dds::sub::detail::CDRSamplesHolder, dds::sub::detail::LoanedSamplesHolder< T >, dds::sub::detail::SamplesBIIteratorHolder< T, SamplesBIIterator >, dds::sub::detail::SamplesFWInteratorHolder< T, SamplesFWIterator >

Public Functions

inline SamplesHolder()
inline virtual ~SamplesHolder()
virtual void set_length(uint32_t len) = 0
virtual uint32_t get_length() const = 0
virtual SamplesHolder &operator++(int) = 0
virtual void *data() = 0
virtual detail::SampleInfo &info() = 0
virtual void **cpp_sample_pointers(size_t length) = 0
virtual dds_sample_info_t *cpp_info_pointers(size_t length) = 0
virtual void set_sample_contents(void **c_sample_pointers, dds_sample_info_t *info) = 0
virtual void fini_samples_buffers(void **&c_sample_pointers, dds_sample_info_t *&c_sample_infos) = 0
class dds::sub::status::SampleState : public std::bitset<OMG_DDS_STATE_BIT_COUNT>
#include <DataState.hpp>

Class to hold SampleState information.

For each sample, the Data Distribution Service internally maintains a sample_state specific to each DataReader. The sample_state can either be READ_SAMPLE_STATE or NOT_READ_SAMPLE_STATE.

    • The DataReader has already accessed that sample by means of read. Had the sample been accessed by take it would no longer be available to the DataReader.

    • The DataReader has not accessed that sample before.

See

for more information: SampleInfo

Public Types

typedef std::bitset<OMG_DDS_STATE_BIT_COUNT> MaskType

Convenience typedef for std::bitset<OMG_DDS_STATE_BIT_COUNT>.

Public Functions

SampleState()

Construct a SampleState with default MaskType.

explicit SampleState(uint32_t i)

Construct a SampleState with MaskType of i.

Parameters

i – MaskType

SampleState(const SampleState &src)

Copy constructor. Construct a SampleState with existing SampleState.

Parameters

src – the SampleState to copy from

SampleState &operator=(const SampleState &src) = default

Copy assignment operator.

Copy the contents from one SampleState to another.

Parameters

src – the SampleState to copy from

Returns

reference to the SampleState instance that was copied to

SampleState(const MaskType &src)

Construct a SampleState with existing MaskType.

Parameters

src – the MaskType to copy from

Public Static Functions

static inline const SampleState read()

Get the READ_SAMPLE_STATE.

read

  • The DataReader has already accessed that sample by means of read. Had the sample been accessed by take it would no longer be available to the DataReader.

Returns

the read SampleState

static inline const SampleState not_read()

Get the NOT_READ_SAMPLE_STATE.

not_read

  • The DataReader has not accessed that sample before.

Returns

the not_read SampleState

static inline const SampleState any()

Get any SampleState.

Either the sample has already been read or not read.

Returns

any SampleState

struct org::eclipse::cyclonedds::core::policy::SchedulingKind

Public Types

enum Type

Values:

enumerator SCHEDULE_DEFAULT
enumerator SCHEDULE_TIMESHARING
enumerator SCHEDULE_REALTIME
struct org::eclipse::cyclonedds::core::policy::SchedulingPriorityKind

Public Types

enum Type

Values:

enumerator PRIORITY_RELATIVE
enumerator PRIORITY_ABSOLUTE
template<typename LOCKABLE>
class org::eclipse::cyclonedds::core::ScopedLock

Public Functions

inline ScopedLock(const LOCKABLE &obj, bool lock = true)
inline virtual ~ScopedLock()
inline void lock()
inline bool try_lock()
inline void unlock()
inline bool own() const

Private Members

const LOCKABLE &lockable
bool owner
class dds::sub::DataReader::Selector
#include <DataReader.hpp>

The Selector class is used by the DataReader to compose read operations.

A Selector can perform complex data selections, such as per-instance selection, content and status filtering, etc, when reading or taking samples. These settings on a Selector can be concatenated.

The DataReader has the select() operation, which can be used to aqcuire the Selector functionality on the reader implicitly.

// Take a maximum of 3 new samples of a certain instance.
samples = reader.select()
                    .max_samples(3)
                    .state(dds::sub::status::DataState::new_data())
                    .instance(someValidInstanceHandle)
                    .take();
However, this will create and destroy a Selector for every read, which is not very performance friendly.

The performance can be increase by creating a Selector up front and doing the reading on that Selector directly and re-using it.

// Create a Selector as selective reader up front.
dds::sub::DataReader<Foo::Bar>::Selector selectiveReader(reader);
// Configure it to take a maximum of 3 new samples of a certain instance
selectiveReader.max_samples(3);
selectiveReader.state(dds::sub::status::DataState::new_data());
selectiveReader.instance(someValidInstanceHandle);

// Use the configured Selector to -take- a maximum of 3 new samples of a
// certain instance (which it was configured to do).
// This can be used in loops for example, reducing the need for creating
// implicit Selectors for every take.
samples = selectiveReader.take();

Defaults

Element

Default Value

state

dds::sub::status::DataState::any

content

Empty dds::sub::Query

max_samples

dds::core::LENGTH_UNLIMITED

instance

dds::core::InstanceHandle nil

See

for more information: DataReader select()

Public Functions

Selector(DataReader &dr)

Construct a Selector for a DataReader.

Parameters

drDataReader

Selector &instance(const dds::core::InstanceHandle &handle)

Set InstanceHandle to filter with during the read or take.

Example Read only samples of the given instance.

dds::core::InstanceHandle hdl = someValidInstanceHandle;

// Implicit use of Selector
samples = reader.select().instance(hdl).read();

// Explicit use of Selector
dds::sub::DataReader<Foo::Bar>::Selector selectiveReader(reader);
selectiveReader.instance(hdl);
samples = selectiveReader.read();
See also DataReader select() operation.

Parameters

handle – the InstanceHandle to read/take for

Returns

a Selector to be able to concatenate Selector settings.

Selector &next_instance(const dds::core::InstanceHandle &handle)

Set next InstanceHandle to filter with during the read or take.

Example Read all samples, instance by instance.

// Implicit use of Selector
{
    // Get sample(s) of first instance
    dds::core::InstanceHandle hdl; //nil
    samples = reader.select().next_instance(hdl).read();
    while (samples.length() > 0) {
        // Handle the sample(s) of this instance (just the first one in this case)
        const dds::sub::Sample<Foo::Bar>& sample = *(samples.begin());
        // Get sample(s) of the next instance
        hdl = sample.info().instance_handle();
        samples = reader.select().next_instance(hdl).read();
    }
}

// Explicit use of Selector
{
    // Get sample(s) of first instance
    dds::sub::DataReader<Foo::Bar>::Selector selectiveReader(reader);
    dds::core::InstanceHandle hdl; //nil
    selectiveReader.next_instance(hdl);
    samples = selectiveReader.read();
    while (samples.length() > 0) {
        // Handle the sample(s) of this instance (just the first one in this case)
        const dds::sub::Sample<Foo::Bar>& sample = *(samples.begin());
        // Get sample(s) of the next instance
        hdl = sample.info().instance_handle();
        selectiveReader.next_instance(hdl);
        samples = selectiveReader.read();
    }
}
See also DataReader select() operation.

Parameters

handle – the ‘previous’ InstanceHandle associated with new the read/take

Returns

a Selector to be able to concatenate Selector settings.

Selector &state(const dds::sub::status::DataState &state)

Set DataState to filter with during the read or take.

Example Read only new data.

// DataState to filter only new data
dds::sub::status::DataState newData = dds::sub::status::DataState::new_data();

// Implicit use of Selector
samples = reader.select().state(newData).read();

// Explicit use of Selector
dds::sub::DataReader<Foo::Bar>::Selector selectiveReader(reader);
selectiveReader.state(newData);
samples = selectiveReader.read();
See also DataReader select() operation.

Parameters

state – the requested DataState of the samples

Returns

a Selector to be able to concatenate Selector settings.

Selector &content(const dds::sub::Query &query)

Set the Query to filter with during the read or take.

Example Read only samples that will be filtered according to the given dds::sub::Query.

// Assume data type has an element called long_1
dds::sub::Query query(reader, "long_1 > 1 and long_1 < 7");

// Implicit use of Selector
samples = reader.select().content(query).read();

// Explicit use of Selector
dds::sub::DataReader<Foo::Bar>::Selector selectiveReader(reader);
selectiveReader.content(query);
samples = selectiveReader.read();
See also DataReader select() operation.

Parameters

query – the Query to apply to the selector

Returns

a Selector to be able to concatenate Selector settings.

Selector &max_samples(uint32_t maxsamples)

Set max_samples to limit the number of sample to get during the read or take.

Example Read a maximum of three samples.

// Implicit use of Selector
samples = reader.select().max_samples(3).read();

// Explicit use of Selector
dds::sub::DataReader<Foo::Bar>::Selector selectiveReader(reader);
selectiveReader.max_samples(3);
samples = selectiveReader.read();
See also DataReader select() operation.

Parameters

maxsamples – maximum number of samples to read/take

Returns

a Selector to be able to concatenate Selector settings.

dds::sub::LoanedSamples<T> read()

This operation works the same as the default DataReader read() , except that it is performed on this Selector with possible filters set.

Throws
Returns

The samples in the LoanedSamples container

dds::sub::LoanedSamples<T> take()

This operation works the same as the default DataReader take() , except that it is performed on this Selector with possible filters set.

Throws
Returns

The samples in the LoanedSamples container

template<typename SamplesFWIterator>
uint32_t read(SamplesFWIterator sfit, uint32_t max_samples)

This operation works the same as the forward iterator DataReader read() , except that it is performed on this Selector with possible filters set.

Parameters
  • sfit – Forward-inserting container iterator

  • max_samples – Maximum samples to read and copy into the given container

Throws
Returns

The number of samples in the LoanedSamples container

template<typename SamplesFWIterator>
uint32_t take(SamplesFWIterator sfit, uint32_t max_samples)

This operation works the same as the forward iterator DataReader take() , except that it is performed on this Selector with possible filters set.

Parameters
  • sfit – Forward-inserting container iterator

  • max_samples – Maximum samples to read and copy into the given container

Throws
Returns

The number of samples in the given container

template<typename SamplesBIIterator>
uint32_t read(SamplesBIIterator sbit)

This operation works the same as the backward iterator DataReader read() , except that it is performed on this Selector with possible filters set.

Parameters

sbit – Back-inserting container iterator

Throws
Returns

The number of samples in the given container

template<typename SamplesBIIterator>
uint32_t take(SamplesBIIterator sbit)

This operation works the same as the backward iterator DataReader take() , except that it is performed on this Selector with possible filters set.

Parameters

sbit – Back-inserting container iterator

Throws
Returns

The number of samples in the given container

Private Members

DELEGATE<T>::Selector impl_
class dds::sub::detail::DataReader::Selector

Subclassed by dds::sub::detail::DataReader< T >::ManipulatorSelector

Public Functions

Selector(typename DataReader<T>::ref_type dr)
Selector &instance(const dds::core::InstanceHandle &h)
Selector &next_instance(const dds::core::InstanceHandle &h)
Selector &filter_state(const dds::sub::status::DataState &s)
Selector &max_samples(uint32_t n)
Selector &filter_content(const dds::sub::Query &query)
dds::sub::LoanedSamples<T> read()
dds::sub::LoanedSamples<T> take()
template<typename SamplesFWIterator>
uint32_t read(SamplesFWIterator sfit, uint32_t max_samples)
template<typename SamplesFWIterator>
uint32_t take(SamplesFWIterator sfit, uint32_t max_samples)
template<typename SamplesBIIterator>
uint32_t read(SamplesBIIterator sbit)
template<typename SamplesBIIterator>
uint32_t take(SamplesBIIterator sbit)
SelectMode get_mode() const

Private Members

SelectMode mode
DataReader<T>::ref_type reader
dds::sub::status::DataState state_filter_
bool state_filter_is_set_
dds::core::InstanceHandle handle
uint32_t max_samples_
dds::sub::Query query_

Friends

friend class DataReader
class SequenceType
class dds::core::xtypes::SequenceType : public dds::core::xtypes::CollectionType

Public Functions

SequenceType(const DynamicType &type)

Create an unbounded sequence for the given type.

SequenceType(const DynamicType &type, uint32_t bounds)

Create a bounded sequence for the given type.

const DyanmicType &key_type() const
class org::eclipse::cyclonedds::core::cond::ShadowParticipant

Public Functions

inline dds_entity_t get_participant()

Public Static Functions

static inline ShadowParticipant &getInstance()

Private Functions

inline ShadowParticipant(dds_entity_t ddsc_participant)
inline ~ShadowParticipant()
ShadowParticipant(const ShadowParticipant&)
ShadowParticipant &operator=(const ShadowParticipant&)

Private Members

dds_entity_t ddsc_participant_

Private Static Attributes

static ShadowParticipant *instance_
static org::eclipse::cyclonedds::core::Mutex mutex_
class org::eclipse::cyclonedds::core::policy::Share : public dds::core::Value

Public Functions

inline Share()

Creates a Share QoS instance

inline Share(const std::string &name, bool enable)

Creates a Share QoS instance

Parameters
  • name – the name

  • enable – state

inline Share(const Share &other)

Copies a Share QoS instance

Parameters

other – the Share QoS instance to copy

inline Share &name(const std::string &name)

Sets the name

Parameters

name – the name

inline std::string name() const

Gets the name

Returns

the name

inline Share &enable(bool enable)

Sets enable state

Parameters

enable – state

inline bool enable() const

Gets enable state

Returns

enable state

class dds::core::xtypes::SharedAnnotation : public dds::core::xtypes::Annotation

Public Functions

SharedAnnotation()
class SharedAnnotation : public dds::core::xtypes::detail::Annotation
template<typename T>
class dds::sub::detail::SharedSamples

Public Types

typedef std::vector<dds::sub::Sample<T, Sample>>::iterator iterator
typedef std::vector<dds::sub::Sample<T, Sample>>::const_iterator const_iterator

Public Functions

inline SharedSamples()
inline SharedSamples(dds::sub::LoanedSamples<T> ls)
inline ~SharedSamples()
inline iterator mbegin()
inline const_iterator begin() const
inline const_iterator end() const
inline uint32_t length() const
inline void resize(uint32_t s)

Private Members

dds::sub::LoanedSamples<T> samples_
template<typename T>
class dds::sub::SharedSamples
#include <SharedSamples.hpp>

This class encapsulates and automates the management of loaned samples.

Note

The specification of this class is not yet finished. It will possibly change in the future. Anyway, this class is basically a copy of LoanedSamples when considering its functionality. So, anything you would want to do with this class can also be done by the LoanedSamples.

Public Types

typedef T DataType
typedef DELEGATE<T>::const_iterator const_iterator
typedef dds::core::smart_ptr_traits::ref_type DELEGATE_REF_T

Public Functions

SharedSamples()

Constructs a SharedSamples instance.

SharedSamples(dds::sub::LoanedSamples<T> ls)

Constructs an instance of SharedSamples and removes the ownership of the loan from the LoanedSamples. As a result the destruction of the LoanedSamples object will have no effect on loaned data. Loaned data will be returned automatically once the delegate of this reference type will have a zero reference count.

Parameters

ls – the loaned samples

SharedSamples(const SharedSamples &other)

Copies a SharedSamples instance.

~SharedSamples()
const_iterator begin() const

Gets an iterator pointing to the beginning of the samples.

Returns

an iterator pointing to the beginning of the samples

const_iterator end() const

Gets an iterator pointing to the beginning of the samples.

Returns

an iterator pointing to the beginning of the samples

const DELEGATE_REF_T &delegate() const

Gets the delegate.

Returns

the delegate

DELEGATE_REF_T &delegate()

Gets the delegate.

Returns

the delegate

uint32_t length() const

Returns the number of samples.

Returns

the number of samples

Private Members

DELEGATE_REF_T delegate_
template<typename T>
struct dds::core::smart_ptr_traits

Public Types

typedef ::std::shared_ptr<T> ref_type
typedef ::std::weak_ptr<T> weak_ref_type
class dds::sub::functors::detail::StateFilterManipulatorFunctor

Public Functions

inline StateFilterManipulatorFunctor(const dds::sub::status::DataState &s)
template<typename S>
inline void operator()(S &s)

Private Members

dds::sub::status::DataState state_
template<typename T>
class dds::core::cond::StatusCondition : public dds::core::cond::Condition
#include <StatusCondition.hpp>

A StatusCondition object is a specific Condition that is associated with each Entity.

Entity objects that have status attributes also have a StatusCondition, access is provided to the application by the get_statuscondition operation. The communication statuses whose changes can be communicated to the application depend on the Entity. The following table shows the relevant statuses for each Entity.

Entity

Status Name

dds::topic::Topic

dds::core::status::StatusMask::inconsistent_topic()

dds::sub::Subscriber

dds::core::status::StatusMask::data_on_readers()

dds::sub::DataReader

dds::core::status::StatusMask::sample_rejected() dds::core::status::StatusMask::liveliness_changed() dds::core::status::StatusMask::requested_deadline_missed() dds::core::status::StatusMask::requested_incompatible_qos() dds::core::status::StatusMask::data_available() dds::core::status::StatusMask::sample_lost() dds::core::status::StatusMask::subscription_matched()

dds::pub::DataWriter

dds::core::status::StatusMask::liveliness_lost() dds::core::status::StatusMask::offered_deadline_missed() dds::core::status::StatusMask::offered_incompatible_qos() dds::core::status::StatusMask::publication_matched()

The inherited dds::core::cond::Condition::trigger_value() of the StatusCondition depends on the communication statuses of that Entity (e.g., missed deadline) and also depends on the value of the dds::core::status::StatusMask.

A StatusCondition can be attached to a WaitSet in order to allow an application to suspend until the trigger_value has become TRUE.

The trigger_value of a StatusCondition will be TRUE if one of the enabled StatusChangedFlags is set. That is, trigger_value==FALSE only if all the values of the StatusChangedFlags are FALSE.

The sensitivity of the StatusCondition to a particular communication status is controlled by the list of enabled_statuses set on the condition by means of dds::core::cond::StatusCondition::enabled_statuses(const ::dds::core::status::StatusMask& status) When the enabled_statuses are not changed by that operation, all statuses are enabled by default.

See the WaitSet examples for examples how to use this Condition.

See

dds::core::cond::Condition

See

for more information: Status concept

See

for more information: WaitSet concept

See

for more information: WaitSet examples

Public Functions

StatusCondition(const dds::core::Entity &e)

Create a dds::core::cond::StatusCondition associated with an Entity.

The StatusCondition can then be added to a dds::core::cond::WaitSet so that the application can wait for specific status changes that affect the Entity.

Parameters

e – The Entity to associate with the StatusCondition.

Throws

dds::core::Exception

template<typename FUN>
StatusCondition(const dds::core::Entity &e, FUN functor)

Create a dds::core::cond::StatusCondition associated with an Entity.

The StatusCondition can then be added to a dds::core::cond::WaitSet so that the application can wait for specific status changes that affect the Entity.

The supplied functor will be called when this StatusCondition is triggered and either the inherited dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this StatusCondition is attached to.

Parameters
Throws

dds::core::Exception

void enabled_statuses(const ::dds::core::status::StatusMask &status) const

This operation sets the list of communication statuses that are taken into account to determine the trigger_value of the StatusCondition.

The inherited dds::core::cond::Condition::trigger_value() of the StatusCondition depends on the communication status of that Entity (e.g., missed deadline, loss of information, etc.), ‘filtered’ by the set of enabled_statuses on the StatusCondition.

This operation sets the list of communication statuses that are taken into account to determine the trigger_value of the StatusCondition. This operation may change the trigger_value of the StatusCondition.

dds::core::cond::WaitSet objects behaviour depend on the changes of the trigger_value of their attached Conditions. Therefore, any WaitSet to which the StatusCondition is attached is potentially affected by this operation. If this function is not invoked, the default list of enabled_statuses includes all the statuses.

The result value is a bit mask in which each bit shows which value has changed. The relevant bits represent one of the following statuses:

Each status bit is declared as a constant and can be used in an AND operation to check the status bit against the result of type StatusMask. Not all statuses are relevant to all Entity objects. See the respective Listener interfaces for each Entity for more information.

Parameters

status – A bit mask in which each bit sets the status which is taken into account for the StatusCondition.the enabled statuses.

Throws
const ::dds::core::status::StatusMask enabled_statuses() const

This operation returns the list of enabled communication statuses of the StatusCondition.

The inherited dds::core::cond::Condition::trigger_value() of the StatusCondition depends on the communication status of that Entity (e.g., missed deadline, loss of information, etc.), ‘filtered’ by the set of enabled_statuses on the StatusCondition.

This operation returns the list of communication statuses that are taken into account to determine the trigger_value of the StatusCondition. This operation returns the statuses that were explicitly set on the last call to dds::core::cond::StatusCondition::enabled_statuses(const ::dds::core::status::StatusMask& status) const or, if enabled_statuses(status) was never called, the default list.

The result value is a bit mask in which each bit shows which value has changed. The relevant bits represent one of the following statuses:

Each status bit is declared as a constant and can be used in an AND operation to check the status bit against the result of type StatusMask. Not all statuses are relevant to all Entity objects. See the respective Listener interfaces for each Entity for more information.

Throws

dds::core::Exception

Returns

dds::core::status::StatusMask A bit mask in which each bit shows which status is taken into account for the StatusCondition.

const dds::core::Entity &entity() const

This operation returns the Entity associated with the StatusCondition

Note that there is exactly one Entity associated with each StatusCondition.

Throws

dds::core::AlreadyClosedError

Returns

dds::core::Entity The Entity associated with the StatusCondition.

class org::eclipse::cyclonedds::core::cond::StatusConditionDelegate : public org::eclipse::cyclonedds::core::cond::ConditionDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<StatusConditionDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<StatusConditionDelegate>::weak_ref_type weak_ref_type

Public Functions

StatusConditionDelegate(const org::eclipse::cyclonedds::core::EntityDelegate *entity, dds_entity_t uEntity)
~StatusConditionDelegate()
virtual void close()
virtual void init(org::eclipse::cyclonedds::core::ObjectDelegate::weak_ref_type weak_ref)
void enabled_statuses(const dds::core::status::StatusMask &status)
dds::core::status::StatusMask enabled_statuses() const
dds::core::Entity &entity()
virtual bool trigger_value() const
dds::core::cond::StatusCondition<StatusConditionDelegate> wrapper()

Private Members

dds::core::Entity myEntity
class dds::core::status::StatusMask : public std::bitset<OMG_DDS_STATUS_COUNT>
#include <State.hpp>

StatusMask is a bitmap or bitset field.

This bitset is used to:

See

for more information: Status concept

Public Types

typedef std::bitset<OMG_DDS_STATUS_COUNT> MaskType

Convenience typedef for std::bitset<OMG_DDS_STATE_BIT_COUNT>.

Public Functions

StatusMask()

Construct an StatusMask with no flags set.

explicit StatusMask(uint32_t mask)

Construct an StatusMask with an uint32_t bit mask.

Parameters

mask – the bit array to initialize the bitset with

StatusMask(const StatusMask &other)

Copy constructor.

Construct an StatusMask with existing StatusMask.

Parameters

other – the StatusMask to copy from

StatusMask &operator=(const StatusMask &other) = default

Copy assignment operator.

Copies the contents from one StatusMask to another.

Parameters

other – the StatusMask to copy from

Returns

reference to the StatusMask that was copied to

inline StatusMask &operator<<(const dds::core::status::StatusMask &mask)

Shift (merge) given StatusMask bits into this StatusMask bitset.

Returns

StatusMask this

Public Static Functions

static inline StatusMask all()

Get all StatusMasks

Returns

StatusMask all

static inline StatusMask none()

Get no StatusMasks

Returns

StatusMask none

static inline StatusMask inconsistent_topic()

Get the StatusMask associated with dds::core::status::InconsistentTopicStatus

Returns

StatusMask inconsistent_topic

static inline StatusMask offered_deadline_missed()

Get the StatusMask associated with dds::core::status::OfferedDeadlineMissedStatus

Returns

StatusMask offered_deadline_missed

static inline StatusMask requested_deadline_missed()

Get the StatusMask associated with dds::core::status::RequestedDeadlineMissedStatus

Returns

StatusMask requested_deadline_missed

static inline StatusMask offered_incompatible_qos()

Get the StatusMask associated with dds::core::status::OfferedIncompatibleQosStatus

Returns

StatusMask offered_incompatible_qos

static inline StatusMask requested_incompatible_qos()

Get the StatusMask associated with dds::core::status::RequestedIncompatibleQosStatus

Returns

StatusMask requested_incompatible_qos

static inline StatusMask sample_lost()

Get the StatusMask associated with dds::core::status::SampleLostStatus

Returns

StatusMask sample_lost

static inline StatusMask sample_rejected()

Get the StatusMask associated with dds::core::status::SampleRejectedStatus

Returns

StatusMask sample_rejected

static inline StatusMask data_on_readers()

Get the StatusMask associated with dds::core::status::data_on_readers

Returns

StatusMask data_on_readers

static inline StatusMask data_available()

get the statusmask associated with dds::core::status::data_available

Returns

statusmask data_available

static inline StatusMask liveliness_lost()

Get the StatusMask associated with dds::core::status::LivelinessLostStatus

Returns

StatusMask liveliness_lost

static inline StatusMask liveliness_changed()

Get the StatusMask associated with dds::core::status::LivelinessChangedStatus

Returns

StatusMask liveliness_changed

static inline StatusMask publication_matched()

Get the statusmask associated with dds::core::status::PublicationMatchedStatus

Returns

StatusMask publication_matched

static inline StatusMask subscription_matched()

Get the statusmask associated with dds::core::status::SubscriptionMatchedStatus

Returns

StatusMask subscription_matched

class StringTopicType
template<typename CHAR_T>
class StringType
template<typename CHAR_T, template<typename C> class DELEGATE>
class dds::core::xtypes::StringType

Public Functions

StringType(uint32_t bounds)
class dds::core::xtypes::StructForwardDeclaration : public DynamicType
#include <StructType.hpp>

Declares a forward declaration for a struct type.

Public Functions

StructForwardDeclaration(const std::string &name)
class dds::core::xtypes::StructType : public DynamicType
#include <StructType.hpp>

Create a dynamic structure type. If the members don’t have Id associated explicitly, then their ID will be the same as the ordinal position on the members vector.

Public Functions

StructType(const std::string &name)
StructType(const std::string &name, const StructType &parent, const std::vector<MemberType> &members)
template<typename MemberIter>
StructType(const std::string &name, const StructType &parent, const MemberIter &begin, const MemberIter &end)
StructType(const std::string &name, const StructType &parent, const std::vector<MemberType> &members, const Annotation &annotation)
StructType(const std::string &name, const StructType &parent, const std::vector<MemberType> &members, const std::vector<Annotation> &annotations)
template<typename AnnotationIter, typename MemberIter>
StructType(const std::string &name, const StructType &parent, const MemberIter &begin, const MemberIter &end, const AnnotationIter &begin, const AnnotationIter &end)
StructType parent() const
const std::vector<MemberType> &members() const
const MemberType &member(uint32_t id) const
const MemberType &member(const std::string &name) const
const std::vector<Annotation> &annotations() const
StructType add_member(const MemberType &member) const
StructType remove_member(const MemberType &member) const
StructType add_annotation(const Annotation &annotation) const
StructType remove_annotation(const Annotation &annotation) const
class StructType
class dds::sub::Subscriber : public dds::core::Entity
#include <Subscriber.hpp>

A Subscriber is the object responsible for the actual reception of the data resulting from its subscriptions.

A Subscriber acts on the behalf of one or several DataReader objects that are related to it. When it receives data (from the other parts of the system), it builds the list of concerned DataReader objects, and then indicates to the application that data is available, through its listener or by enabling related conditions. The application can access the list of concerned DataReader objects through the operation get_datareaders and then access the data available through operations on the DataReader.

See

for more information: Subscriber

Public Types

typedef dds::sub::SubscriberListener Listener

Local convenience typedef for dds::sub::SubscriberListener.

Public Functions

Subscriber(const ::dds::domain::DomainParticipant &dp)

Create a new Subscriber.

The Subscriber will be created with the QoS values specified on the last successful call to dp.default_subscriber_qos(qos) or, if the call was never made, the default values.

Parameters

dp – the domain participant

Throws
Subscriber(const ::dds::domain::DomainParticipant &dp, const dds::sub::qos::SubscriberQos &qos, dds::sub::SubscriberListener *listener = NULL, const dds::core::status::StatusMask &mask = dds::core::status::StatusMask::none())

Create a new Subscriber.

The Subscriber will be created with the given QosPolicy settings and if applicable, attaches the optionally specified SubscriberListener to it.

See listener for more information about listeners and possible status propagation to other entities.

Parameters
  • dp – the domain participant to create the Subscriber with.

  • qos – a collection of QosPolicy settings for the new Subscriber. In case these settings are not self consistent, no Subscriber is created.

  • listener – the subscriber listener

  • mask – the mask of events notified to the listener

Throws
void notify_datareaders()

This operation invokes the on_data_available operation on DataReaderListener objects which are attached to the contained DataReader entities having new, available data.

The notify_datareaders operation ignores the bit mask value of individual DataReaderListener objects, even when the dds::core::status::StatusMask::data_available() has not been set on a DataReader that has new, available data. The on_data_available operation will still be invoked, when the dds::core::status::StatusMask::data_available() bit has not been set on a DataReader, but will not propagate to the DomainParticipantListener.

When the DataReader has attached a NULL listener, the event will be consumed and will not propagate to the DomainParticipantListener. (Remember that a NULL listener is regarded as a listener that handles all its events as a NOOP).

Look here for Status change information.

Look here for Listener information.

Throws
void listener(Listener *listener, const dds::core::status::StatusMask &event_mask)

Register a listener with the Subscriber.

The notifications received by the listener depend on the status mask with which it was registered.

Listener un-registration is performed by setting the listener to NULL.

See also listener information.

Parameters
  • listener – the listener

  • event_mask – the mask defining the events for which the listener will be notified.

Throws
Listener *listener() const

Get the listener of this Subscriber.

See also listener information.

Throws

dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

Returns

the listener

const dds::sub::qos::SubscriberQos &qos() const

Gets the SubscriberQos setting for this instance.

Throws
Returns

the qos

void qos(const dds::sub::qos::SubscriberQos &sqos)

Sets the SubscriberQos setting for this instance.

Parameters

sqos – the qos

Throws
dds::sub::qos::DataReaderQos default_datareader_qos() const

Gets the default DataReaderQos of the Subscriber.

This operation gets an object with the default DataReader QosPolicy settings of the Subscriber (that is the DataReaderQos) which is used for newly created DataReader objects, in case no QoS was provided during the creation.

The values retrieved by this operation match the set of values specified on the last successful call to dds::sub::Subscriber::default_datareader_qos(const dds::sub::qos::DataReaderQos& qos), or, if the call was never made, the default values.

Throws
Returns

the default DataReaderQos

Subscriber &default_datareader_qos(const dds::sub::qos::DataReaderQos &qos)

Sets the default DataReaderQos of the Subscriber.

This operation sets the default SubscriberQos of the Subscriber which is used for newly created Subscriber objects, when no QoS is provided.

This operation checks if the DataReaderQos is self consistent. If it is not, the operation has no effect and throws dds::core::InconsistentPolicyError.

The values set by this operation are returned by dds::sub::Subscriber::default_datareader_qos().

Parameters

qos – the default DataReaderQos

Throws
const dds::domain::DomainParticipant &participant() const

Return the DomainParticipant that owns this Subscriber.

Throws
Returns

the DomainParticipant

Subscriber &operator<<(const dds::sub::qos::SubscriberQos &qos)

Sets the SubscriberQos setting for this instance.

Parameters

sqos – the qos

Throws
const Subscriber &operator>>(dds::sub::qos::SubscriberQos &qos) const

Gets the SubscriberQos setting for this instance.

Throws
Returns

the qos

class org::eclipse::cyclonedds::sub::SubscriberDelegate : public org::eclipse::cyclonedds::core::EntityDelegate

Subclassed by org::eclipse::cyclonedds::sub::BuiltinSubscriberDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<SubscriberDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<SubscriberDelegate>::weak_ref_type weak_ref_type

Public Functions

SubscriberDelegate(const dds::domain::DomainParticipant &dp, const dds::sub::qos::SubscriberQos &qos, dds::sub::SubscriberListener *listener, const dds::core::status::StatusMask &event_mask)
virtual ~SubscriberDelegate()
void init(ObjectDelegate::weak_ref_type weak_ref)
virtual void close()
const dds::sub::qos::SubscriberQos &qos() const
void qos(const dds::sub::qos::SubscriberQos &sqos)
void default_datareader_qos(const dds::sub::qos::DataReaderQos &qos)
dds::sub::qos::DataReaderQos default_datareader_qos() const
void begin_coherent_access()
void end_coherent_access()
void listener(dds::sub::SubscriberListener *listener, const ::dds::core::status::StatusMask &mask)
dds::sub::SubscriberListener *listener() const
const dds::domain::DomainParticipant &participant() const
bool contains_entity(const ::dds::core::InstanceHandle &handle)
void add_datareader(org::eclipse::cyclonedds::core::EntityDelegate &datareader)
void remove_datareader(org::eclipse::cyclonedds::core::EntityDelegate &datareader)
virtual std::vector<org::eclipse::cyclonedds::sub::AnyDataReaderDelegate::ref_type> find_datareaders(const std::string &topic_name)
std::vector<org::eclipse::cyclonedds::sub::AnyDataReaderDelegate::ref_type> get_datareaders(const dds::sub::status::DataState &mask)
void notify_datareaders()
dds::sub::Subscriber<SubscriberDelegate> wrapper()
bool is_auto_enable() const
void reset_data_on_readers()
virtual void on_data_readers(dds_entity_t)
virtual void on_requested_deadline_missed(dds_entity_t reader, org::eclipse::cyclonedds::core::RequestedDeadlineMissedStatusDelegate &sd)
virtual void on_requested_incompatible_qos(dds_entity_t reader, org::eclipse::cyclonedds::core::RequestedIncompatibleQosStatusDelegate &sd)
virtual void on_sample_rejected(dds_entity_t reader, org::eclipse::cyclonedds::core::SampleRejectedStatusDelegate &sd)
virtual void on_liveliness_changed(dds_entity_t reader, org::eclipse::cyclonedds::core::LivelinessChangedStatusDelegate &sd)
virtual void on_data_available(dds_entity_t reader)
virtual void on_subscription_matched(dds_entity_t reader, org::eclipse::cyclonedds::core::SubscriptionMatchedStatusDelegate &sd)
virtual void on_sample_lost(dds_entity_t reader, org::eclipse::cyclonedds::core::SampleLostStatusDelegate &sd)

Private Members

dds::domain::DomainParticipant dp_
dds::sub::qos::SubscriberQos qos_
dds::sub::qos::DataReaderQos default_dr_qos_
org::eclipse::cyclonedds::core::EntitySet readers
class dds::sub::SubscriberListener : public virtual dds::sub::AnyDataReaderListener
#include <SubscriberListener.hpp>

Subscriber events Listener.

Since a Subscriber is an Entity, it has the ability to have a Listener associated with it. In this case, the associated Listener should be of type SubscriberListener. This interface must be implemented by the application. A user-defined class must be provided by the application which must extend from the SubscriberListener class.

The SubscriberListener provides a generic mechanism (actually a callback function) for the Data Distribution Service to notify the application of relevant asynchronous status change events, such as a missed deadline, violation of a QosPolicy setting, etc. The SubscriberListener is related to changes in communication status StatusConditions.

// Application example listener
class ExampleListener :
               public virtual dds::sub::SubscriberListener
{
public:
    virtual void on_requested_deadline_missed (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::RequestedDeadlineMissedStatus & status)
    {
        std::cout << "on_requested_deadline_missed" << std::endl;
    }

    virtual void on_requested_incompatible_qos (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::RequestedIncompatibleQosStatus & status)
    {
        std::cout << "on_requested_incompatible_qos" << std::endl;
    }

    virtual void on_sample_rejected (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::SampleRejectedStatus & status)
    {
        std::cout << "on_sample_rejected" << std::endl;
    }

    virtual void on_liveliness_changed (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::LivelinessChangedStatus & status)
    {
        std::cout << "on_liveliness_changed" << std::endl;
    }

    virtual void on_data_available (
        dds::sub::AnyDataReader& reader)
    {
        std::cout << "on_data_available" << std::endl;
    }

    virtual void on_subscription_matched (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::SubscriptionMatchedStatus & status)
    {
        std::cout << "on_subscription_matched" << std::endl;
    }

    virtual void on_sample_lost (
        dds::sub::AnyDataReader& reader,
        const dds::core::status::SampleLostStatus & status)
    {
        std::cout << "on_sample_lost" << std::endl;
    }

    virtual void on_data_on_readers (
        dds::sub::Subscriber& subs)
    {
        std::cout << "on_data_on_readers" << std::endl;
    }
};

// Create Subscriber with the listener
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::sub::Subscriber subscriber(participant,
                                participant.default_subscriber_qos(),
                                new ExampleListener(),
                                dds::core::status::StatusMask::all());

See

for more information: Subscriber

See

for more information: Listener information

Subclassed by dds::domain::DomainParticipantListener, dds::sub::NoOpSubscriberListener

Public Functions

virtual void on_data_on_readers(Subscriber &sub) = 0

This operation called by the Data Distribution Service when new data is available for this Subscriber.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant SubscriberListener is installed and enabled with the StatusMask::data_on_readers().

The statuses on_data_on_readers() and on_data_available() will occur together. In case these status changes occur, the Data Distribution Service will look for an attached and activated SubscriberListener or DomainParticipantListener (in that order) for the enabled StatusMask::data_on_readers(). In case the StatusMask::data_on_readers() can not be handled, the Data Distribution Service will look for an attached and activated DataReaderListener, SubscriberListener or DomainParticipantListener for the enabled StatusMask::data_available() (in that order).

Note that if on_data_on_readers() is called, then the Data Distribution Service will not try to call on_data_available(), however, the application can force a call to the callback function on_data_available of DataReaderListener objects that have data by means of the Subscriber::notify_datareaders() operation.

Parameters

sub – contain a pointer to the Subscriber for which data is available (this is an input to the application provided by the Data Distribution Service).

class dds::sub::qos::SubscriberQos : public dds::core::EntityQos<org::eclipse::cyclonedds::sub::qos::SubscriberQosDelegate>
#include <SubscriberQos.hpp>

This class provides the basic mechanism for an application to specify Quality of Service attributes for a Subscriber.

A QosPolicy can be set when the Subscriber is created or modified with the set qos operation. Both operations take the SubscriberQos object as a parameter. There may be cases where several policies are in conflict. Consistency checking is performed each time the policies are modified when they are being created and, in case they are already enabled, via the set qos operation.

Attributes

QosPolicy

Desciption

Default Value

dds::core::policy::Presentation

Data-instance change dependencies (info)

Presentation::InstanceAccessScope(coherent=false, ordered=false)

dds::core::policy::Partition

Active partitions (info)

Partition::Partition(empty)

dds::core::policy::GroupData

Additional information (info)

GroupData::GroupData(empty)

dds::core::policy::EntityFactory

Create enabled (info)

EntityFactory::AutoEnable()

Some QosPolicy have “immutable” semantics meaning that they can only be specified either at Subscriber creation time or prior to calling the enable operation on the Subscriber.

See

for more information: DCPS_QoS

Public Functions

inline SubscriberQos()

Create default QoS.

SubscriberQos(const SubscriberQos &qos)

Create copied QoS type.

Parameters

qos – the QoS to copy policies from.

class org::eclipse::cyclonedds::sub::qos::SubscriberQosDelegate

Public Functions

SubscriberQosDelegate()
SubscriberQosDelegate(const SubscriberQosDelegate &other)
~SubscriberQosDelegate()
void policy(const dds::core::policy::Presentation &presentation)
void policy(const dds::core::policy::Partition &partition)
void policy(const dds::core::policy::GroupData &grout_data)
void policy(const dds::core::policy::EntityFactory &entity_factory)
template<typename POLICY>
const POLICY &policy() const
template<typename POLICY>
POLICY &policy()
dds_qos_t *ddsc_qos() const
void ddsc_qos(const dds_qos_t *qos)
void named_qos(const struct _DDS_NamedSubscriberQos &qos)
void check() const
bool operator==(const SubscriberQosDelegate &other) const
SubscriberQosDelegate &operator=(const SubscriberQosDelegate &other)
template<>
inline dds::core::policy::Presentation &policy()
template<>
inline dds::core::policy::Partition &policy()
template<>
inline dds::core::policy::GroupData &policy()
template<>
inline dds::core::policy::EntityFactory &policy()

Private Members

dds::core::policy::Presentation presentation_
dds::core::policy::Partition partition_
dds::core::policy::GroupData group_data_
dds::core::policy::EntityFactory entity_factory_
class dds::topic::SubscriptionBuiltinTopicData : public dds::core::Value
#include <BuiltinTopic.hpp>

Class that contains information about available DataReaders within the system.

The DCPSSubscription topic communicates the existence of datareaders by means of the SubscriptionBuiltinTopicData datatype. Each SubscriptionBuiltinTopicData sample in a Domain represents a datareader in that Domain: a new SubscriptionBuiltinTopicData instance is created when a newly-added DataReader is enabled, and it is disposed when that DataReader is deleted. An updated SubscriptionBuiltinTopicData sample is written each time the DataReader (or the Subscriber to which it belongs) modifies a QosPolicy that applies to the entities connected to it.

// Get builtin subscriber
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::sub::Subscriber builtinSubscriber = dds::sub::builtin_subscriber(participant);

// Get DCPSSubscription builtin reader (happy flow)
string name = "DCPSSubscription";
vector<dds::sub::DataReader<dds::topic::SubscriptionBuiltinTopicData> > readersVector;
dds::sub::find<dds::sub::DataReader<dds::topic::SubscriptionBuiltinTopicData>,
                      back_insert_iterator<vector<dds::sub::DataReader<dds::topic::SubscriptionBuiltinTopicData> > > >(
          builtinSubscriber,
          name,
          back_inserter<vector<dds::sub::DataReader<dds::topic::SubscriptionBuiltinTopicData> > >(readersVector));
dds::sub::DataReader<dds::topic::SubscriptionBuiltinTopicData> builtinReader = readersVector[0];

// The builtinReader can now be used just as a normal dds::sub::DataReader to get
// dds::topic::SubscriptionBuiltinTopicData samples.

See

for more information: DCPS_Builtin_Topics

See

for more information: DCPS_Builtin_Topics_SubscriptionData

Public Functions

const dds::topic::BuiltinTopicKey &key() const

Global unique identifier of the DataReader

const dds::topic::BuiltinTopicKey &participant_key() const

Global unique identifier of the Participant to which the DataReader belongs

const std::string &topic_name() const

Name of the Topic used by the DataReader

const std::string &type_name() const

Type name of the Topic used by the DataReader

const ::dds::core::policy::Durability &durability() const

QosPolicy attached to the DataReader

const ::dds::core::policy::Deadline &deadline() const

QosPolicy attached to the DataReader

const ::dds::core::policy::LatencyBudget &latency_budget() const

QosPolicy attached to the DataReader

const ::dds::core::policy::Liveliness &liveliness() const

QosPolicy attached to the DataReader

const ::dds::core::policy::Reliability &reliability() const

QosPolicy attached to the DataReader

const ::dds::core::policy::Ownership &ownership() const

QosPolicy attached to the DataReader

const ::dds::core::policy::DestinationOrder &destination_order() const

QosPolicy attached to the DataReader

const ::dds::core::policy::UserData &user_data() const

QosPolicy attached to the DataReader

const ::dds::core::policy::TimeBasedFilter &time_based_filter() const

QosPolicy attached to the DataReader

const ::dds::core::policy::Presentation &presentation() const

QosPolicy attached to the Subscriber to which the DataReader belongs

const ::dds::core::policy::Partition &partition() const

QosPolicy attached to the Subscriber to which the DataReader belongs

const ::dds::core::policy::TopicData &topic_data() const

QosPolicy attached to the Subscriber to which the DataReader belongs

const ::dds::core::policy::GroupData &group_data() const

QosPolicy attached to the Subscriber to which the DataReader belongs

class org::eclipse::cyclonedds::topic::SubscriptionBuiltinTopicDataDelegate

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline void key(const int32_t *key)
inline const dds::topic::BuiltinTopicKey &participant_key() const
inline void participant_key(const int32_t *key)
inline const std::string &topic_name() const
inline void topic_name(const char *name)
inline const std::string &type_name() const
inline void type_name(const char *name)
inline const ::dds::core::policy::Durability &durability() const
inline void durability(const dds_qos_t *policy)
inline const ::dds::core::policy::Deadline &deadline() const
inline void deadline(const dds_qos_t *policy)
inline const ::dds::core::policy::LatencyBudget &latency_budget() const
inline void latency_budget(const dds_qos_t *policy)
inline const ::dds::core::policy::Liveliness &liveliness() const
inline void liveliness(const dds_qos_t *policy)
inline const ::dds::core::policy::Reliability &reliability() const
inline void reliability(const dds_qos_t *policy)
inline const ::dds::core::policy::DestinationOrder &destination_order() const
inline void destination_order(const dds_qos_t *policy)
inline const ::dds::core::policy::TimeBasedFilter &time_based_filter() const
inline void time_based_filter(const dds_qos_t *policy)
inline const ::dds::core::policy::Ownership &ownership() const
inline void ownership(const dds_qos_t *policy)
inline const ::dds::core::policy::TopicData &topic_data() const
inline void topic_data(const dds_qos_t *policy)
inline const ::dds::core::policy::Partition &partition() const
inline void partition(const dds_qos_t *policy)
inline const ::dds::core::policy::Presentation &presentation() const
inline void presentation(const dds_qos_t *policy)
inline const ::dds::core::policy::UserData &user_data() const
inline void user_data(const dds_qos_t *policy)
inline const ::dds::core::policy::GroupData &group_data() const
inline void group_data(const dds_qos_t *policy)
inline bool operator==(const SubscriptionBuiltinTopicDataDelegate &other) const

Public Members

dds::topic::BuiltinTopicKey key_
dds::topic::BuiltinTopicKey participant_key_
std::string topic_name_
std::string type_name_
::dds::core::policy::Durability durability_
::dds::core::policy::Deadline deadline_
::dds::core::policy::LatencyBudget latency_budget_
::dds::core::policy::Liveliness liveliness_
::dds::core::policy::Reliability reliability_
::dds::core::policy::Ownership ownership_
::dds::core::policy::DestinationOrder destination_order_
::dds::core::policy::UserData user_data_
::dds::core::policy::TimeBasedFilter time_based_filter_
::dds::core::policy::Presentation presentation_
::dds::core::policy::Partition partition_
::dds::core::policy::TopicData topic_data_
::dds::core::policy::GroupData group_data_
class org::eclipse::cyclonedds::core::policy::SubscriptionKey : public dds::core::Value

Public Functions

inline SubscriptionKey()

Creates a SubscriptionKey QoS instance

inline explicit SubscriptionKey(bool use_key_list, const std::string &key)

Creates a SubscriptionKey QoS instance

Parameters
  • use_key_list – use the key list or not

  • key – a single key

inline explicit SubscriptionKey(bool use_key_list, const dds::core::StringSeq &keys)

Creates a SubscriptionKey QoS instance

Parameters
  • use_key_list – use the key list or not

  • keys – a sequence containing multiple keys

inline SubscriptionKey(const SubscriptionKey &other)

Copies a SubscriptionKey QoS instance

Parameters

other – the SubscriptionKey QoS instance to copy

inline SubscriptionKey &key(const std::string &key)

Sets the key

Parameters

key – the key

inline SubscriptionKey &key(const dds::core::StringSeq &keys)

Sets multiple keys

Parameters

keys – a sequence containing multiple keys

inline const dds::core::StringSeq key() const

Gets the keys

Returns

a sequence containing the keys

inline SubscriptionKey &use_key_list(bool use_key_list)

Sets use_key_list state

Parameters

use_key_list – state

inline bool use_key_list() const

Gets use_key_list state

Returns

use_key_list state

class dds::core::status::SubscriptionMatchedStatus : public dds::core::Value
#include <Status.hpp>

Public Functions

SubscriptionMatchedStatus()
int32_t total_count() const
Returns

Total cumulative count the concerned DataReader discovered a “match” with a DataWriter. That is, it found a DataWriter for the same Topic with a requested QoS that is compatible with that offered by the DataReader.

int32_t total_count_change() const
Returns

The change in total_count since the last time the listener was called or the status was read.

int32_t current_count() const
Returns

The number of DataWriters currently matched to the concerned DataReader.

int32_t current_count_change() const
Returns

The change in current_count since the last time the listener was called or the status was read.

const dds::core::InstanceHandle last_publication_handle() const
Returns

Handle to the last DataWriter that matched the DataReader causing the status to change.

class org::eclipse::cyclonedds::core::SubscriptionMatchedStatusDelegate

Public Functions

inline SubscriptionMatchedStatusDelegate()
inline int32_t total_count() const
inline int32_t total_count_change() const
inline int32_t current_count() const
inline int32_t current_count_change() const
inline const dds::core::InstanceHandle last_publication_handle() const
inline void total_count(int32_t total_count)
inline void total_count_change(int32_t total_count_change)
inline void current_count(int32_t current_count)
inline void current_count_change(int32_t current_count_change)
inline void last_publication_handle(dds::core::InstanceHandle last_publication_handle)
inline bool operator==(const SubscriptionMatchedStatusDelegate &other) const
inline void ddsc_status(const dds_subscription_matched_status_t *from)

Protected Attributes

int32_t total_count_
int32_t total_count_change_
int32_t current_count_
int32_t current_count_change_
dds::core::InstanceHandle last_publication_handle_
class dds::pub::SuspendedPublication : public dds::core::Value
#include <SuspendedPublication.hpp>

Class for RAII way of suspending/resuming publication.

Suspended publication indicates to the Service that the application is about to make multiple modifications using DataWriter objects belonging to the Publisher.

It is a hint to the Service so it can optimize its performance by, e.g., holding the dissemination of the modifications and then batching them. It is not required that the Service use this hint in any way.

When a Suspended publication is started, it must be matched by a corresponding call to SuspendedPublication::resume() or the destruction of the SuspendedPublication object (which is an implicit resume), indicating that the set of modifications has completed. If the Publisher is deleted before the resume, any suspended updates yet to be published will be discarded.

This object suspends the publication of all DataWriter objects contained by the given Publisher. The data written, disposed or unregistered by a DataWriter is stored in the history buffer of the DataWriter and therefore, depending on its QoS settings, the following operations may block (see the operation descriptions for more information):

See

for more information: Publication

See

dds::pub::Publisher

Public Functions

explicit SuspendedPublication(const dds::pub::Publisher &pub)

Creating a SuspendedPublication object, which will suspend the dissemination of the publications by all contained DataWriter objects of the given Publisher.

Parameters

pub – The publisher to supsend publications on.

Throws
void resume()

This operation will explicitly resume the publication of all DataWriter objects contained by the given Publisher at construction.

All data held in the history buffer of the DataWriter’s is actively published to the consumers. When the operation returns all DataWriter’s have resumed the publication of suspended updates.

If the Publisher already resumed its publication (by a call to this very operation), then a call to this operation will have no effect.

Throws
~SuspendedPublication()

The destruction of the SuspendedPublication will implicitly resume the publication if not already resumed by a call to resume().

All data held in the history buffer of the DataWriter’s is actively published to the consumers. When the operation returns all DataWriter’s have resumed the publication of suspended updates.

When there is a problem with which resume() would normally throw an exception, then that exception is swallowed. Errors can be found in the logs.

class org::eclipse::cyclonedds::pub::SuspendedPublicationDelegate

Public Functions

SuspendedPublicationDelegate(const dds::pub::Publisher &pub)
~SuspendedPublicationDelegate()
void resume()
bool operator==(const SuspendedPublicationDelegate &other) const

Private Members

dds::pub::Publisher pub
bool resumed
class dds::core::Time
#include <Time.hpp>

Time represents a time value and can:

  • Be incremented by Duration expressed as seconds, nanoseconds, milliseconds, or Duration objects.

  • Be converted to and from Times expressed in milliseconds (or other units) as integer types.

Public Functions

Time()

Create a Time of zero seconds.

explicit Time(int64_t sec, uint32_t nanosec = 0)

Create a Time elapsing a specific amount of time.

int64_t sec() const
Returns

number of seconds

void sec(int64_t s)

Set number of seconds

Parameters

s – number of seconds

uint32_t nanosec() const
Returns

number of nanoseconds

void nanosec(uint32_t ns)

Set number of nanoseconds

Parameters

ns – number of nanoseconds

int compare(const Time &that) const

Returns an integer indicating the result of a comparison of two Times: 1 if this Time is greater than the comparator (that) -1 if the Time is less than the comparator (that) 0 if the Time matches the comparator (that)

Parameters

thatTime to compare

Returns

comparison result

bool operator>(const Time &that) const
Parameters

thatTime to compare

Returns

true if the Time is greater than the comparator

bool operator>=(const Time &that) const
Parameters

thatTime to compare

Returns

true if the Time is greater than or equal to the comparator

bool operator!=(const Time &that) const
Parameters

thatTime to compare

Returns

true if the Time is not equal to the comparator

bool operator==(const Time &that) const
Parameters

thatTime to compare

Returns

true if the Time is equal to the comparator

bool operator<=(const Time &that) const
Parameters

thatTime to compare

Returns

true if the Time is less than or equal to the comparator

bool operator<(const Time &that) const
Parameters

thatTime to compare

Returns

true if the Time is less than the comparator

Time &operator+=(const Duration &a_ti)
Parameters

a_tiDuration to add

Returns

Time value + Duration

Time &operator-=(const Duration &a_ti)
Parameters

a_tiDuration to subtract

Returns

Time value - Duration

int64_t to_millisecs() const

Returns this Time in milliseconds.

Returns

this Time in milliseconds

int64_t to_microsecs() const

Returns this Time in micro-seconds.

Returns

this Time in micro-seconds

double to_secs() const

Returns this Time in seconds.

Returns

this Time in seconds

Public Static Functions

static const Time invalid()
static const Time from_microsecs(int64_t microseconds)

Create a Time from a number of microseconds

Parameters

microseconds – number of microseconds

static const Time from_millisecs(int64_t milliseconds)

Create a Time from a number of milliseconds

Parameters

milliseconds – number of miliseconds

static const Time from_secs(double seconds)

Create a Time from a number of seconds

Parameters

seconds – number of seconds

Private Members

int64_t sec_
uint32_t nsec_
class dds::core::policy::TimeBasedFilter : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit TimeBasedFilter(const dds::core::Duration &period = dds::core::Duration::zero())

Creates a TimeBasedFilter QoS instance

Parameters

period – minimum separation period

TimeBasedFilter(const TimeBasedFilter &other)

Copies a TimeBasedFilter QoS instance

Parameters

other – the TimeBasedFilter QoS instance to copy

TimeBasedFilter &operator=(const TimeBasedFilter &other) = default

Copies a TimeBasedFilter QoS instance

Parameters

other – the TimeBasedFilter QoS instance to copy

Returns

reference to the TimeBasedFilter QoS instance that was copied to

TimeBasedFilter &minimum_separation(const dds::core::Duration &period)

Sets the minimum separation period

Parameters

period – minimum separation period

const dds::core::Duration minimum_separation() const

Gets the minimum separation period

Returns

minimum separation period

class org::eclipse::cyclonedds::core::policy::TimeBasedFilterDelegate

Public Functions

TimeBasedFilterDelegate(const TimeBasedFilterDelegate &other)
explicit TimeBasedFilterDelegate(const dds::core::Duration &min_separation)
TimeBasedFilterDelegate &operator=(const TimeBasedFilterDelegate &other) = default
void min_separation(const dds::core::Duration &ms)
const dds::core::Duration min_separation() const
bool operator==(const TimeBasedFilterDelegate &other) const
void check() const
void check_against(const org::eclipse::cyclonedds::core::policy::DeadlineDelegate &deadline) const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::Duration min_sep_
class TimeoutError : public dds::core::Exception, public runtime_error
#include <Exception.hpp>

Exception: The operation timed out.

class org::eclipse::cyclonedds::core::policy::TListenerScheduling : public org::eclipse::cyclonedds::core::policy::TScheduling
#include <Policy.hpp>

Listener specific scheduling class

Public Functions

inline TListenerScheduling()

Creates a ListenerScheduling QoS instance

inline explicit TListenerScheduling(const org::eclipse::cyclonedds::core::policy::SchedulingKind::Type &scheduling_kind, const org::eclipse::cyclonedds::core::policy::SchedulingPriorityKind::Type &scheduling_priority_kind, int32_t scheduling_priority)
template<typename T>
class dds::topic::Topic
#include <Topic.hpp>

Topic is the most basic description of the data to be published and subscribed.

A Topic is identified by its name, which must be unique in the whole Domain. In addition (by virtue of extending TopicDescription) it fully specifies the type of the data that can be communicated when publishing or subscribing to the Topic.

Topic is the only TopicDescription that can be used for publications and therefore associated with a DataWriter.

// Default creation of a Topic
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName");

// The Topic can be used to create readers and writers
// DataReader
dds::sub::Subscriber subscriber(participant);
dds::sub::DataReader<Foo::Bar> reader(subscriber, topic);
// DataWriter
dds::pub::Publisher publisher(participant);
dds::pub::DataWriter<Foo::Bar> writer(publisher, topic);

See

for more information: Topic Definition

Public Types

typedef T DataType

Convenience typedef for the type of the data sample.

typedef TopicListener<T> Listener

Local convenience typedef for dds::topic::TopicListener.

Public Functions

Topic(const dds::domain::DomainParticipant &dp, const std::string &topic_name)

Create a new Topic.

This operation creates a reference to a new or existing Topic under the given name, for a specific data type.

QoS The Topic will be created with the QoS values specified on the last successful call to dp.default_topic_qos(qos) or, if the call was never made, the default values.

Existing Topic Name Before creating a new Topic, this operation performs a lookup_topicdescription for the specified topic_name. When a Topic is found with the same name in the current domain, the QoS and type_name of the found Topic are matched against the parameters qos and type_name. When they are the same, no Topic is created but a new proxy of the existing Topic is returned. When they are not exactly the same, no Topic is created and dds::core::Error is thrown.

Local Proxy Since a Topic is a global concept in the system, access is provided through a local proxy. In other words, the reference returned is actually not a reference to a Topic but to a locally created proxy. The Data Distribution Service propagates Topics and makes remotely created Topics locally available through this proxy. The deletion of a Topic object will not delete the Topic from the domain, just the local proxy is deleted.

Parameters
  • dp – the domain participant on which the topic will be defined

  • topic_name – the name of the Topic to be created

Throws
  • dds::core::Error – A other Topic with the same name but different type or QoS was detected in the current domain or another internal error has occurred.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Topic(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const std::string &type_name)

Create a new Topic.

This operation creates a reference to a new or existing Topic under the given name, for a specific data type and type_name.

QoS The Topic will be created with the QoS values specified on the last successful call to dp.default_topic_qos(qos) or, if the call was never made, the default values.

Existing Topic Name Before creating a new Topic, this operation performs a lookup_topicdescription for the specified topic_name. When a Topic is found with the same name in the current domain, the QoS and type_name of the found Topic are matched against the parameters qos and type_name. When they are the same, no Topic is created but a new proxy of the existing Topic is returned. When they are not exactly the same, no Topic is created and dds::core::Error is thrown.

Local Proxy Since a Topic is a global concept in the system, access is provided through a local proxy. In other words, the reference returned is actually not a reference to a Topic but to a locally created proxy. The Data Distribution Service propagates Topics and makes remotely created Topics locally available through this proxy. The deletion of a Topic object will not delete the Topic from the domain, just the local proxy is deleted.

Parameters
  • dp – the domain participant on which the topic will be defined

  • topic_name – the topic’s name

  • type_name – a local alias of the data type

Throws
  • dds::core::Error – A other Topic with the same name but different type or QoS was detected in the current domain or another internal error has occurred.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Topic(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const dds::topic::qos::TopicQos &qos, dds::topic::TopicListener<T> *listener = NULL, const dds::core::status::StatusMask &mask = dds::core::status::StatusMask::none())

Create a new Topic.

This operation creates a reference to a new or existing Topic under the given name, for a specific data type.

QoS A possible application pattern to construct the TopicQos for the Topic is to:

// 1) Retrieve the QosPolicy settings on the associated DomainParticipant
dds::topic::qos::TopicQos topicQos = participant.default_datareader_qos();
// 2) Selectively modify QosPolicy settings as desired.
topicQos << dds::core::policy::Durability::Transient();
// 3) Use the resulting QoS to construct the DataReader.
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName", topicQos);

Existing Topic Name Before creating a new Topic, this operation performs a lookup_topicdescription for the specified topic_name. When a Topic is found with the same name in the current domain, the QoS and type_name of the found Topic are matched against the parameters qos and type_name. When they are the same, no Topic is created but a new proxy of the existing Topic is returned. When they are not exactly the same, no Topic is created and dds::core::Error is thrown.

Local Proxy Since a Topic is a global concept in the system, access is provided through a local proxy. In other words, the reference returned is actually not a reference to a Topic but to a locally created proxy. The Data Distribution Service propagates Topics and makes remotely created Topics locally available through this proxy. The deletion of a Topic object will not delete the Topic from the domain, just the local proxy is deleted.

Listener The following statuses are applicable to the TopicListener:

See listener concept, communication status and communication propagation for more information.

Parameters
  • dp – the domain participant on which the topic will be defined

  • topic_name – the topic’s name

  • qos – the topic listener

  • listener – the topic listener

  • mask – the listener event mask

Throws
  • dds::core::Error – A other Topic with the same name but different type or QoS was detected in the current domain or another internal error has occurred.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Topic(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const std::string &type_name, const dds::topic::qos::TopicQos &qos, dds::topic::TopicListener<T> *listener = NULL, const dds::core::status::StatusMask &mask = dds::core::status::StatusMask::none())

Create a new Topic.

This operation creates a reference to a new or existing Topic under the given name, for a specific data type and type_name.

QoS A possible application pattern to construct the TopicQos for the Topic is to:

// 1) Retrieve the QosPolicy settings on the associated DomainParticipant
dds::topic::qos::TopicQos topicQos = participant.default_datareader_qos();
// 2) Selectively modify QosPolicy settings as desired.
topicQos << dds::core::policy::Durability::Transient();
// 3) Use the resulting QoS to construct the DataReader.
dds::topic::Topic<Foo::Bar> topic(participant, "TopicName", "TypeName", topicQos);

Existing Topic Name Before creating a new Topic, this operation performs a lookup_topicdescription for the specified topic_name. When a Topic is found with the same name in the current domain, the QoS and type_name of the found Topic are matched against the parameters qos and type_name. When they are the same, no Topic is created but a new proxy of the existing Topic is returned. When they are not exactly the same, no Topic is created and dds::core::Error is thrown.

Local Proxy Since a Topic is a global concept in the system, access is provided through a local proxy. In other words, the reference returned is actually not a reference to a Topic but to a locally created proxy. The Data Distribution Service propagates Topics and makes remotely created Topics locally available through this proxy. The deletion of a Topic object will not delete the Topic from the domain, just the local proxy is deleted.

Listener The following statuses are applicable to the TopicListener:

See listener concept, communication status and communication propagation for more information.

Parameters
  • dp – the domain participant on which the topic will be defined

  • topic_name – the topic’s name

  • type_name – a local alias of the data type

  • qos – the topic listener

  • listener – the topic listener

  • mask – the listener event mask

Throws
  • dds::core::Error – A other Topic with the same name but different type or QoS was detected in the current domain or another internal error has occurred.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

void listener(Listener *listener, const ::dds::core::status::StatusMask &event_mask)

Register a listener with the Topic.

This operation attaches a TopicListener to the Topic. Only one TopicListener can be attached to each Topic. If a TopicListener was already attached, the operation will replace it with the new one. When the listener is the NULL pointer, it represents a listener that is treated as a NOOP for all statuses activated in the bit mask.

Listener un-registration is performed by setting the listener to NULL and mask none().

Communication Status For each communication status, the StatusChangedFlag flag is initially set to FALSE. It becomes TRUE whenever that communication status changes. For each communication status activated in the mask, the associated TopicListener operation is invoked and the communication status is reset to FALSE, as the listener implicitly accesses the status which is passed as a parameter to that operation. The status is reset prior to calling the listener, so if the application calls the get_<status_name>_status from inside the listener it will see the status already reset. An exception to this rule is the NULL listener, which does not reset the communication statuses for which it is invoked.

The following statuses are applicable to the TopicListener:

Status bits are declared as a constant and can be used by the application in an OR operation to create a tailored mask. The special constant dds::core::status::StatusMask::none() can be used to indicate that the created entity should not respond to any of its available statuses. The DDS will therefore attempt to propagate these statuses to its factory. The special constant dds::core::status::StatusMask::all() can be used to select all applicable statuses specified in the “Data Distribution Service for Real-time Systems Version 1.2” specification which are applicable to the PublisherListener.

Status Propagation In case a communication status is not activated in the mask of the TopicListener, the DomainParticipantListener of the containing DomainParticipant is invoked (if attached and activated for the status that occurred). This allows the application to set a default behaviour in the DomainParticipantListener of the containing DomainParticipant and a Topic specific behaviour when needed. In case the communication status is not activated in the mask of the DomainParticipantListener as well, the application is not notified of the change.

See also listener information.

Parameters
  • listener – the listener

  • event_mask – the mask defining the events for which the listener will be notified.

Throws
Listener *listener() const

Get the listener of this Topic.

See also listener information.

Throws

dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

Returns

the listener

template<typename T>
class dds::topic::detail::Topic

Public Types

typedef ::dds::core::smart_ptr_traits<Topic<T>>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<Topic<T>>::weak_ref_type weak_ref_type

Public Functions

Topic(const dds::domain::DomainParticipant &dp, const std::string &name, const std::string &type_name, const dds::topic::qos::TopicQos &qos, dds::topic::TopicListener<T> *listener, const dds::core::status::StatusMask &mask)
Topic(const dds::domain::DomainParticipant &dp, const std::string &name, const std::string &type_name, const dds::topic::qos::TopicQos &qos, dds_entity_t ddsc_topic)
virtual ~Topic()
virtual void close()
void init(ObjectDelegate::weak_ref_type weak_ref)
dds::topic::Topic<T, dds::topic::detail::Topic> wrapper()
void listener(dds::topic::TopicListener<T> *listener, const ::dds::core::status::StatusMask &mask)
dds::topic::TopicListener<T> *listener()
virtual void listener_notify(ObjectDelegate::ref_type source, uint32_t triggerMask, void *eventData, void *listener)
dds::topic::TopicDescription<TopicDescriptionDelegate> clone()
void on_inconsistent_topic(dds_entity_t topic, org::eclipse::cyclonedds::core::InconsistentTopicStatusDelegate &s)

Public Static Functions

static dds::topic::Topic<T, dds::topic::detail::Topic> discover_topic(const dds::domain::DomainParticipant &dp, const std::string &name, const dds::core::Duration &timeout)
static void discover_topics(const dds::domain::DomainParticipant &dp, std::vector<dds::topic::Topic<T, dds::topic::detail::Topic>> &topics, uint32_t max_size)

Private Members

T sample_
template<typename T>
struct dds::topic::topic_type_name
#include <TopicTraits.hpp>

Support functionality to get the default type_name of a Topic type.

std::string typeName = dds::topic::topic_type_name<Foo::Bar>::value();

Public Static Functions

static inline std::string value()
class dds::topic::TopicBuiltinTopicData : public dds::core::Value
#include <BuiltinTopic.hpp>

Class that contains information about available Topics within the system.

The DCPSTopic topic communicates the existence of topics by means of the TopicBuiltinTopicData datatype. Each TopicBuiltinTopicData sample in a Domain represents a Topic in that Domain: a new TopicBuiltinTopicData instance is created when a newly-added Topic is enabled. However, the instance is not disposed when a Topic is deleted by its participant because a topic lifecycle is tied to the lifecycle of a Domain, not to the lifecycle of an individual participant. An updated TopicBuiltinTopicData sample is written each time a Topic modifies one or more of its QosPolicy values.

// Get builtin subscriber
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::sub::Subscriber builtinSubscriber = dds::sub::builtin_subscriber(participant);

// Get DCPSTopic builtin reader (happy flow)
string name = "DCPSTopic";
vector<dds::sub::DataReader<dds::topic::TopicBuiltinTopicData> > readersVector;
dds::sub::find<dds::sub::DataReader<dds::topic::TopicBuiltinTopicData>,
                      back_insert_iterator<vector<dds::sub::DataReader<dds::topic::TopicBuiltinTopicData> > > >(
          builtinSubscriber,
          name,
          back_inserter<vector<dds::sub::DataReader<dds::topic::TopicBuiltinTopicData> > >(readersVector));
dds::sub::DataReader<dds::topic::TopicBuiltinTopicData> builtinReader = readersVector[0];

// The builtinReader can now be used just as a normal dds::sub::DataReader to get
// dds::topic::TopicBuiltinTopicData samples.

See

for more information: DCPS_Builtin_Topics

See

for more information: DCPS_Builtin_Topics_TopicData

Public Functions

const dds::topic::BuiltinTopicKey &key() const

Global unique identifier of the Topic

const std::string &name() const

Name of the Topic

const std::string &type_name() const

Type name of the Topic (i.e. the fully scoped IDL name)

const ::dds::core::policy::Durability &durability() const

QosPolicy attached to the Topic

const ::dds::core::policy::Deadline &deadline() const

QosPolicy attached to the Topic

const ::dds::core::policy::LatencyBudget &latency_budget() const

QosPolicy attached to the Topic

const ::dds::core::policy::Liveliness &liveliness() const

QosPolicy attached to the Topic

const ::dds::core::policy::Reliability &reliability() const

QosPolicy attached to the Topic

const ::dds::core::policy::TransportPriority &transport_priority() const

QosPolicy attached to the Topic

const ::dds::core::policy::Lifespan &lifespan() const

QosPolicy attached to the Topic

const ::dds::core::policy::DestinationOrder &destination_order() const

QosPolicy attached to the Topic

const ::dds::core::policy::History &history() const

QosPolicy attached to the Topic

const ::dds::core::policy::ResourceLimits &resource_limits() const

QosPolicy attached to the Topic

const ::dds::core::policy::Ownership &ownership() const

QosPolicy attached to the Topic

const ::dds::core::policy::TopicData &topic_data() const

QosPolicy attached to the Topic

class org::eclipse::cyclonedds::topic::TopicBuiltinTopicDataDelegate

Public Functions

inline const dds::topic::BuiltinTopicKey &key() const
inline void key(const int32_t *key)
inline const std::string &name() const
inline void name(const char *name)
inline const std::string &type_name() const
inline void type_name(const char *name)
inline const ::dds::core::policy::Durability &durability() const
inline void durability(const dds_qos_t *policy)
inline const ::dds::core::policy::Deadline &deadline() const
inline void deadline(const dds_qos_t *policy)
inline const ::dds::core::policy::LatencyBudget &latency_budget() const
inline void latency_budget(const dds_qos_t *policy)
inline const ::dds::core::policy::Liveliness &liveliness() const
inline void liveliness(const dds_qos_t *policy)
inline const ::dds::core::policy::Reliability &reliability() const
inline void reliability(const dds_qos_t *policy)
inline const ::dds::core::policy::TransportPriority &transport_priority() const
inline void transport_priority(const dds_qos_t *policy)
inline const ::dds::core::policy::Lifespan &lifespan() const
inline void lifespan(const dds_qos_t *policy)
inline const ::dds::core::policy::DestinationOrder &destination_order() const
inline void destination_order(const dds_qos_t *policy)
inline const ::dds::core::policy::History &history() const
inline void history(const dds_qos_t *policy)
inline const ::dds::core::policy::ResourceLimits &resource_limits() const
inline void resource_limits(const dds_qos_t *policy)
inline const ::dds::core::policy::Ownership &ownership() const
inline void ownership(const dds_qos_t *policy)
inline const ::dds::core::policy::TopicData &topic_data() const
inline void topic_data(const dds_qos_t *policy)
inline bool operator==(const TopicBuiltinTopicDataDelegate &other) const

Protected Attributes

dds::topic::BuiltinTopicKey key_
std::string name_
std::string type_name_
::dds::core::policy::Durability durability_
::dds::core::policy::Deadline deadline_
::dds::core::policy::LatencyBudget latency_budget_
::dds::core::policy::Liveliness liveliness_
::dds::core::policy::Reliability reliability_
::dds::core::policy::TransportPriority transport_priority_
::dds::core::policy::Lifespan lifespan_
::dds::core::policy::DestinationOrder destination_order_
::dds::core::policy::History history_
::dds::core::policy::ResourceLimits resource_limits_
::dds::core::policy::Ownership ownership_
::dds::core::policy::TopicData topic_data_
class dds::core::policy::TopicData : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

TopicData()

Creates a TopicData QoS instance

explicit TopicData(const dds::core::ByteSeq &sequence)

Creates a TopicData QoS instance

Parameters

sequence – the sequence of octets representing the TopicData

TopicData(const TopicData &other)

Copies a TopicData QoS instance

Parameters

other – the TopicData QoS instance to copy

TopicData(const uint8_t *value_begin, const uint8_t *value_end)

Creates a TopicData QoS instance

Parameters
  • value_begin – a pointer to the beginning of a sequence of octets

  • value_end – a pointer to the end of a sequence of octets

TopicData &operator=(const TopicData &other) = default

Copies a TopicData QoS instance

Parameters

other – the TopicData QoS instance to copy

Returns

Reference to the TopicData QoS instance that was copied to

TopicData &value(const dds::core::ByteSeq &sequence)

Set the sequence

Parameters

sequence – a sequence of octets

template<typename OCTET_ITER>
TopicData &value(OCTET_ITER begin, OCTET_ITER end)

Set the sequence

Parameters
  • begin – an iterator pointing to the beginning of a sequence of octets

  • end – an iterator pointing to the end of a sequence of octets

const dds::core::ByteSeq value() const

Get the sequence

Returns

a sequence of octets

const uint8_t *begin() const

Gets a pointer to the first octet in the sequence

Returns

a pointer to the first octet in the sequence

const uint8_t *end() const

Gets a pointer to the last octet in the sequence

Returns

a pointer to the last octet in the sequence

class org::eclipse::cyclonedds::core::policy::TopicDataDelegate

Public Functions

TopicDataDelegate()
TopicDataDelegate(const TopicDataDelegate &other)
explicit TopicDataDelegate(const dds::core::ByteSeq &seq)
TopicDataDelegate &operator=(const TopicDataDelegate &other) = default
void value(const dds::core::ByteSeq &seq)
const dds::core::ByteSeq &value() const
bool operator==(const TopicDataDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::ByteSeq value_
class dds::topic::TopicDescription : public virtual dds::core::Reference
#include <TopicDescription.hpp>

This class is the base for Topic, ContentFilteredTopic and MultiTopic.

The TopicDescription attribute type_name defines an unique data type that is made available to the Data Distribution Service when a Topic is created with that type.TopicDescription has also a name that allows it to be retrieved locally.

See

for more information: Topic Definition

Subclassed by dds::topic::AnyTopic

Public Functions

const std::string &name() const

This operation returns the name used to create the TopicDescription.

Returns

the TopicDescription name

const std::string &type_name() const

This operation returns the registered name of the data type associated with the TopicDescription.

Returns

the type_name

const dds::domain::DomainParticipant &domain_participant() const

This operation returns the DomainParticipant associated with the TopicDescription.

Note that there is exactly one DomainParticipant associated with each TopicDescription.

Returns

the DomainParticipant

class org::eclipse::cyclonedds::topic::TopicDescriptionDelegate : public virtual org::eclipse::cyclonedds::core::DDScObjectDelegate

Subclassed by org::eclipse::cyclonedds::topic::AnyTopicDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<TopicDescriptionDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<TopicDescriptionDelegate>::weak_ref_type weak_ref_type

Public Functions

TopicDescriptionDelegate(const dds::domain::DomainParticipant &dp, const std::string &name, const std::string &type_name)
virtual ~TopicDescriptionDelegate()
const std::string &name() const
const std::string &type_name() const
const dds::domain::DomainParticipant &domain_participant() const
void incrNrDependents()
void decrNrDependents()
bool hasDependents() const
virtual std::string reader_expression() const = 0
ddsi_sertype *get_ser_type() const

Protected Attributes

dds::domain::DomainParticipant myParticipant
std::string myTopicName
std::string myTypeName
uint32_t nrDependents
ddsi_sertype *ser_type_
template<typename T>
class dds::topic::TopicInstance
#include <TopicInstance.hpp>

A TopicInstance encapsulates a dds::sub::Sample and its associated dds::core::InstanceHandle.

See

for more information: Topic Definition

See

for more information: dds::sub::Sample

See

for more information: dds::core::InstanceHandle

Public Functions

TopicInstance()

Construct a TopicInstance.

explicit TopicInstance(const ::dds::core::InstanceHandle &h)

Construct a TopicInstance with an InstanceHandle.

Parameters

h – the InstanceHandle

TopicInstance(const ::dds::core::InstanceHandle &h, const T &sample)

Construct a TopicInstance with an InstanceHandle and a sample type.

Parameters
  • h – the InstanceHandle

  • sample – the <Type>

operator const ::dds::core::InstanceHandle() const

Conversion operator to get the InstanceHandle.

Returns

the InstanceHandle for the TopicInstance

const ::dds::core::InstanceHandle handle() const

Get the InstanceHandle.

Returns

the InstanceHandle for the TopicInstance

void handle(const ::dds::core::InstanceHandle &h)

Set the InstanceHandle.

Parameters

h – the InstanceHandle to set to the TopicInstance

const T &sample() const

Get the data sample

Returns

the sample for the TopicInstance

T &sample()

Get the data sample

Returns

the sample for the TopicInstance

void sample(const T &sample)

Set the data sample

Parameters

sample – send a sample for this TopicInstance

Private Members

::dds::core::InstanceHandle h_
T sample_
template<typename T>
class dds::topic::TopicListener
#include <TopicListener.hpp>

Topic events Listener.

Since a Topic is an Entity, it has the ability to have a Listener associated with it. In this case, the associated Listener should be of type TopicListener. This interface must be implemented by the application. A user-defined class must be provided by the application which must extend from the TopicListener class.

The TopicListener provides a generic mechanism (actually a callback function) for the Data Distribution Service to notify the application of relevant asynchronous status change events, such as a missed deadline, violation of a QosPolicy setting, etc. The TopicListener is related to changes in communication status StatusConditions.

// Application example listener
class ExampleListener :
               public virtual dds::topic::TopicListener<Foo::Bar>
{
public:
    virtual void on_inconsistent_topic (
        dds::topic::Topic<Foo::Bar>& topic,
        const dds::core::status::InconsistentTopicStatus& status)
    {
        std::cout << "on_inconsistent_topic" << std::endl;
    }
};

// Create Topic with the listener
dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id());
dds::topic::Topic<Foo::Bar> topic(participant,
                                  "TopicName",
                                  participant.default_topic_qos(),
                                  new ExampleListener(),
                                  dds::core::status::StatusMask::all());

See

for more information: Topic

See

for more information: Listener information

Subclassed by dds::topic::NoOpTopicListener< T >, org::eclipse::cyclonedds::topic::TopicListener< T >

Public Functions

virtual void on_inconsistent_topic(Topic<T> &topic, const dds::core::status::InconsistentTopicStatus &status) = 0

This operation is called by the Data Distribution Service when the InconsistentTopicStatus changes.

The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant TopicListener is installed and enabled with the StatusMask::inconsistent_topic(). The InconsistentTopicStatus will change when another Topic exists with the same topic_name but different characteristics.

Parameters
  • topic – contain a pointer to the Topic on which the conflict occurred (this is an input to the application).

  • status – contain the InconsistentTopicStatus object (this is an input to the application).

template<typename T>
class org::eclipse::cyclonedds::topic::TopicListener : public dds::topic::TopicListener<T>

Subclassed by org::eclipse::cyclonedds::topic::NoOpTopicListener< T >

Public Functions

inline virtual ~TopicListener()
class dds::topic::qos::TopicQos : public dds::core::EntityQos<org::eclipse::cyclonedds::topic::qos::TopicQosDelegate>
#include <TopicQos.hpp>

This struct provides the basic mechanism for an application to specify Quality of Service attributes for a Topic.

A QosPolicy can be set when the Topic is created or modified with the set qos operation. Both operations take the TopicQos object as a parameter. There may be cases where several policies are in conflict. Consistency checking is performed each time the policies are modified when they are being created and, in case they are already enabled, via the set qos operation.

Attributes

QosPolicy

Desciption

Default Value

dds::core::policy::TopicData

Additional information (info)

TopicData::TopicData(empty)

dds::core::policy::Durability

Data storage settings for late joiners (info)

Durability::Volatile()

dds::core::policy::DurabilityService

Transient/persistent behaviour (info)

DurabilityService::DurabilityService()

dds::core::policy::Deadline

Period in which new sample is written (info)

Deadline::Deadline(infinite)

dds::core::policy::LatencyBudget

Used for optimization (info)

LatencyBudget::LatencyBudget(zero)

dds::core::policy::Liveliness

Liveliness assertion mechanism (info)

Liveliness::Automatic()

dds::core::policy::Reliability

Reliability settings (info)

Reliability::Reliable()

dds::core::policy::DestinationOrder

DataReader data order settings (info)

DestinationOrder::ReceptionTimestamp()

dds::core::policy::History

Data storage settings (info)

History::KeepLast(depth 1)

dds::core::policy::ResourceLimits

Maximum resource settings (info)

ResourceLimits::ResourceLimits(all unlimited)

dds::core::policy::TransportPriority

Priority hint for transport layer (info)

TransportPriority::TransportPriority(0)

dds::core::policy::Lifespan

Maximum duration of validity of data (info)

Lifespan::Lifespan(infinite)

dds::core::policy::Ownership

Exclusive ownership or not (info)

Ownership::Shared()

Some QosPolicy have “immutable” semantics meaning that they can only be specified either at Topic creation time or prior to calling the enable operation on the Topic.

See

for more information: DCPS_QoS

Public Functions

inline TopicQos()

Create default QoS.

TopicQos(const TopicQos &qos)

Create copied QoS type.

Parameters

qos – the QoS to copy policies from.

class org::eclipse::cyclonedds::topic::qos::TopicQosDelegate

Public Functions

TopicQosDelegate()
void policy(const dds::core::policy::TopicData &topic_data)
void policy(const dds::core::policy::Durability &durability)
void policy(const dds::core::policy::Deadline &deadline)
void policy(const dds::core::policy::LatencyBudget &budget)
void policy(const dds::core::policy::Liveliness &liveliness)
void policy(const dds::core::policy::Reliability &reliability)
void policy(const dds::core::policy::DestinationOrder &order)
void policy(const dds::core::policy::History &history)
void policy(const dds::core::policy::ResourceLimits &resources)
void policy(const dds::core::policy::TransportPriority &priority)
void policy(const dds::core::policy::Lifespan &lifespan)
void policy(const dds::core::policy::Ownership &ownership)
template<typename POLICY>
const POLICY &policy() const
template<typename POLICY>
POLICY &policy()
dds_qos_t *ddsc_qos() const
void ddsc_qos(const dds_qos_t *qos)
void named_qos(const struct _DDS_NamedTopicQos &qos)
void check() const
bool operator==(const TopicQosDelegate &other) const
template<>
inline dds::core::policy::TopicData &policy()
template<>
inline dds::core::policy::Durability &policy()
template<>
inline dds::core::policy::Deadline &policy()
template<>
inline dds::core::policy::LatencyBudget &policy()
template<>
inline dds::core::policy::Liveliness &policy()
template<>
inline dds::core::policy::Reliability &policy()
template<>
inline dds::core::policy::DestinationOrder &policy()
template<>
inline dds::core::policy::History &policy()
template<>
inline dds::core::policy::ResourceLimits &policy()
template<>
inline dds::core::policy::TransportPriority &policy()
template<>
inline dds::core::policy::Lifespan &policy()
template<>
inline dds::core::policy::Ownership &policy()

Private Members

dds::core::policy::TopicData topic_data_
dds::core::policy::Durability durability_
dds::core::policy::Deadline deadline_
dds::core::policy::LatencyBudget budget_
dds::core::policy::Liveliness liveliness_
dds::core::policy::Reliability reliability_
dds::core::policy::DestinationOrder order_
dds::core::policy::History history_
dds::core::policy::ResourceLimits resources_
dds::core::policy::TransportPriority priority_
dds::core::policy::Lifespan lifespan_
dds::core::policy::Ownership ownership_
template<class TOPIC>
class org::eclipse::cyclonedds::topic::TopicTraits

Public Functions

inline ::std::vector<uint8_t> getMetaData()
inline ::std::vector<uint8_t> getTypeHash()
inline ::std::vector<uint8_t> getExtentions()

Public Static Functions

static inline ::org::eclipse::cyclonedds::topic::DataRepresentationId_t getDataRepresentationId()
static inline bool isKeyless()
static inline const char *getTypeName()
static inline ddsi_sertype *getSerType()
static inline size_t getSampleSize()
static inline bool isSelfContained()
class dds::core::policy::TransportPriority : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit TransportPriority(int32_t priority = 0)

Creates a TransportPriority QoS instance

Parameters

priority – the priority value

TransportPriority(const TransportPriority &other)

Copies a TransportPriority QoS instance

Parameters

other – the TransportPriority QoS instance to copy

TransportPriority &operator=(const TransportPriority &other) = default

Copies a TransportPriority QoS instance

Parameters

other – the TransportPriority QoS instance to copy

Returns

Reference to the TransportPriority QoS instance that was copied to

TransportPriority &value(int32_t priority)

Sets the priority value

Parameters

priority – the priority value

int32_t value() const

Gets the priority value

Returns

the priority value

class org::eclipse::cyclonedds::core::policy::TransportPriorityDelegate

Public Functions

TransportPriorityDelegate(const TransportPriorityDelegate &other)
TransportPriorityDelegate &operator=(const TransportPriorityDelegate &other) = default
explicit TransportPriorityDelegate(int32_t prio)
void value(int32_t prio)
int32_t value() const
bool operator==(const TransportPriorityDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

int32_t value_
class org::eclipse::cyclonedds::core::policy::TReaderLifespan : public dds::core::Value

Public Functions

inline TReaderLifespan()

Creates a ReaderLifespan QoS instance

inline explicit TReaderLifespan(bool used, const dds::core::Duration &duration)

Creates a ReaderLifespan QoS instance

Parameters
  • used – Indicates ReaderLifespan is used

  • duration – ReaderLifespan expiration duration

inline TReaderLifespan(const TReaderLifespan &other)

Copies a Lifespan QoS instance

Parameters

other – the Lifespan QoS instance to copy

inline TReaderLifespan &used(bool used)

Sets the used flag

Parameters

used – the state of the flag to set

inline bool used() const

Gets the used flag

Returns

true if used

inline TReaderLifespan &duration(const dds::core::Duration &duration)

Sets the expiration duration

Parameters

duration – expiration duration

inline const dds::core::Duration duration() const

Gets the expiration duration

Returns

expiration duration

class org::eclipse::cyclonedds::core::policy::TScheduling : public dds::core::Value
#include <Policy.hpp>

Base scheduling class

Subclassed by org::eclipse::cyclonedds::core::policy::TListenerScheduling, org::eclipse::cyclonedds::core::policy::TWatchdogScheduling

Public Functions

inline TScheduling()

Creates a Scheduling QoS instance

inline TScheduling(const org::eclipse::cyclonedds::core::policy::SchedulingKind::Type &scheduling_kind, const org::eclipse::cyclonedds::core::policy::SchedulingPriorityKind::Type &scheduling_priority_kind, int32_t scheduling_priority)

Creates a Scheduling QoS instance

Parameters
  • scheduling_kind – the scheduling kind

  • scheduling_priority_kind – the scheduling priority kind

  • scheduling_priority – the scheduling priority

inline TScheduling(const TScheduling &other)

Copies a Scheduling QoS instance

Parameters

other – the ProductData QoS instance to copy

inline TScheduling &scheduling_kind(const org::eclipse::cyclonedds::core::policy::SchedulingKind::Type &scheduling_kind)

Sets the scheduling kind

Parameters

scheduling_kind – the scheduling_kind

inline org::eclipse::cyclonedds::core::policy::SchedulingKind::Type scheduling_kind() const

Gets the scheduling kind

Returns

the scheduling_kind

inline TScheduling &scheduling_kind(const org::eclipse::cyclonedds::core::policy::SchedulingPriorityKind::Type &scheduling_priority_kind)

Sets the scheduling priority kind

Parameters

scheduling_priority_kind – the scheduling_priority_kind

inline org::eclipse::cyclonedds::core::policy::SchedulingPriorityKind::Type scheduling_priority_kind() const

Gets the scheduling priority kind

Returns

the scheduling_priority_kind

inline TScheduling &scheduling_priority(int32_t scheduling_priority)

Sets the scheduling priority

Parameters

scheduling_priority – the scheduling_priority

inline int32_t scheduling_priority() const

Gets the scheduling priority

Returns

the scheduling_priority

class org::eclipse::cyclonedds::core::policy::TWatchdogScheduling : public org::eclipse::cyclonedds::core::policy::TScheduling
#include <Policy.hpp>

Watchdog specific scheduling class

Public Functions

inline TWatchdogScheduling()

Creates a WatchdogScheduling QoS instance

inline explicit TWatchdogScheduling(const org::eclipse::cyclonedds::core::policy::SchedulingKind::Type &scheduling_kind, const org::eclipse::cyclonedds::core::policy::SchedulingPriorityKind::Type &scheduling_priority_kind, int32_t scheduling_priority)
struct dds::core::policy::TypeConsistencyEnforcementKind

Public Types

enum Type

Values:

enumerator EXACT_TYPE_TYPE_CONSISTENCY
enumerator EXACT_NAME_TYPE_CONSISTENCY
enumerator DECLARED_TYPE_CONSISTENCY
enumerator ASSIGNABLE_TYPE_CONSISTENCY
template<typename T, typename DELEGATE>
struct org::eclipse::cyclonedds::topic::typed_finder

Public Static Functions

template<typename TOPIC>
static inline TOPIC find(const dds::domain::DomainParticipant &dp, const std::string &topic_name)
template<typename T>
struct org::eclipse::cyclonedds::topic::typed_finder<T, dds::topic::detail::ContentFilteredTopic<T>>

Public Static Functions

static inline dds::topic::ContentFilteredTopic<T> find(const dds::domain::DomainParticipant &dp, const std::string &topic_name)
template<typename T>
struct org::eclipse::cyclonedds::topic::typed_finder<T, dds::topic::detail::Topic<T>>

Public Static Functions

static inline dds::topic::Topic<T> find(const dds::domain::DomainParticipant &dp, const std::string &topic_name)
template<typename T, typename DELEGATE>
struct org::eclipse::cyclonedds::topic::typed_lookup_topic

Public Static Functions

template<typename TOPIC>
static inline TOPIC discover(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const dds::core::Duration &timeout)
template<typename TOPIC>
static inline void discover(const dds::domain::DomainParticipant &dp, std::vector<TOPIC> &list, uint32_t max_size)
template<typename T>
struct org::eclipse::cyclonedds::topic::typed_lookup_topic<T, dds::topic::detail::ContentFilteredTopic<T>>

Public Static Functions

static inline dds::topic::ContentFilteredTopic<T> discover(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const dds::core::Duration &timeout)
static inline void discover(const dds::domain::DomainParticipant &dp, std::vector<dds::topic::ContentFilteredTopic<T>> &list, uint32_t max_size)
template<typename T>
struct org::eclipse::cyclonedds::topic::typed_lookup_topic<T, dds::topic::detail::Topic<T>>

Public Static Functions

static inline dds::topic::Topic<T> discover(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const dds::core::Duration &timeout)
static inline void discover(const dds::domain::DomainParticipant &dp, std::vector<dds::topic::Topic<T>> &list, uint32_t max_size)
class TypeProvider
class dds::core::xtypes::TypeProvider
#include <TypeProvider.hpp>

TypeProvider that allows creation of types from external representations.

Public Static Functions

static DynamicType load_type(const std::string &uri)

Load a type from the specified URI. If multiple types are defined only the first one is returned.

static std::vector<DynamicType> load_types(const std::string &uri)

Load a type from the specified URI. If multiple types are defined only the first one is returned.

static DynamicType load_type(const std::string &uri, const std::string &name)

Load a named type from the specified URI.

template<typename T>
class UnionCase
template<typename T>
class dds::core::xtypes::UnionCase : public dds::core::Reference

Public Functions

UnionCase()
UnionCase(T discriminator, const MemberType &member)
T discriminator()
const MemberType &member()
class dds::core::xtypes::UnionForwardDeclaration : public DynamicType
#include <UnionType.hpp>

Declares a forward declaration for a union type.

Public Functions

UnionForwardDeclaration(const std::string &name)
template<typename T>
class UnionType
template<typename T, typename DELEGATE>
class dds::core::xtypes::UnionType

Public Functions

UnionType(const std::string &name, const PrimitiveType<T> &discriminator_type, const std::vector<UnionCase<T>> &cases)
UnionType(const std::string &name, const PrimitiveType<T> &discriminator_type, const std::vector<UnionCase<T>> &cases, const Annotation &annotation)
UnionType(const std::string &name, const PrimitiveType<T> &discriminator_type, const std::vector<UnionCase<T>> &cases, const std::vector<Annotation> &annotations)
const std::vector<UnionCase<T>> &members() const
const MemberType &member(uint32_t id) const
const MemberType &member(const std::string &name) const
const std::vector<Annotation> &annotations() const
UnionType add_member(const UnionCase<T> &member) const
UnionType remove_member(const UnionCase<T> &member) const
UnionType add_annotation(const Annotation &annotation) const
UnionType remove_annotation(const Annotation &annotation) const
class UnsupportedError : public dds::core::Exception, public logic_error
#include <Exception.hpp>

Exception: Unsupported operation.

This can only be thrown by operations that are optional.

class dds::core::policy::UserData : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

UserData()

Creates a UserData QoS instance with an empty UserData

explicit UserData(const dds::core::ByteSeq &sequence)

Creates a UserData QoS instance

Parameters

sequence – the sequence of octets

UserData(const uint8_t *value_begin, const uint8_t *value_end)

Creates a UserData QoS instance

Parameters
  • value_begin – a pointer to the beginning of a sequence of octets

  • value_end – a pointer to the end of a sequence of octets

UserData(const UserData &other)

Copies a UserData QoS instance

Parameters

other – the UserData QoS instance to copy

UserData &operator=(const UserData &other) = default

Copies a UserData QoS instance

Parameters

other – the UserData QoS instance to copy

Returns

Reference to the Userdata QoS instance that was copied to

UserData &value(const dds::core::ByteSeq &sequence)

Sets the sequence

Parameters

sequence – a sequence of octets

template<typename OCTET_ITER>
UserData &value(OCTET_ITER begin, OCTET_ITER end)

Sets the sequence

Parameters
  • begin – an iterator pointing to the beginning of a sequence of octets

  • end – an iterator pointing to the end of a sequence of octets

const dds::core::ByteSeq value() const

Gets the sequence

Returns

a sequence of octets

const uint8_t *begin() const

Gets a pointer to the first octet in the sequence

Returns

a pointer to the first octet in the sequence

const uint8_t *end() const

Gets a pointer to the last octet in the sequence

Returns

a pointer to the first octet in the sequence

class org::eclipse::cyclonedds::core::policy::UserDataDelegate

Public Functions

UserDataDelegate()
UserDataDelegate(const UserDataDelegate &other)
UserDataDelegate &operator=(const UserDataDelegate &other) = default
explicit UserDataDelegate(const dds::core::ByteSeq &seq)
void value(const dds::core::ByteSeq &seq)
const dds::core::ByteSeq value() const
bool operator==(const UserDataDelegate &other) const
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

dds::core::ByteSeq value_
class dds::core::Value
#include <Value.hpp>

This class is the base for various value-type dds objects.

QoS, Policy, Statuses, and Topic samples are all modeled as value-types.

All objects that have a value-type have a deep-copy assignment and copy construction semantics. It should also be pointed out that value-types are not ‘pure-value-types’ in the sense that they are immutable (as in functional programming languages).

The DDS-PSM-Cxx makes value-types mutable to limit the number of copies as well as to limit the time-overhead necessary to change a value-type (note that for immutable value-types the only form of change is to create a new value-type).

Subclassed by dds::core::EntityQos, dds::core::InstanceHandle, dds::core::optional< T >, dds::core::policy::Deadline, dds::core::policy::DestinationOrder, dds::core::policy::Durability, dds::core::policy::EntityFactory, dds::core::policy::GroupData, dds::core::policy::History, dds::core::policy::LatencyBudget, dds::core::policy::Lifespan, dds::core::policy::Liveliness, dds::core::policy::Partition, dds::core::policy::Presentation, dds::core::policy::QosPolicyCount, dds::core::policy::ReaderDataLifecycle, dds::core::policy::Reliability, dds::core::policy::ResourceLimits, dds::core::policy::TimeBasedFilter, dds::core::policy::TopicData, dds::core::policy::TransportPriority, dds::core::policy::UserData, dds::core::policy::WriterDataLifecycle, dds::core::status::InconsistentTopicStatus, dds::core::status::LivelinessChangedStatus, dds::core::status::LivelinessLostStatus, dds::core::status::OfferedDeadlineMissedStatus, dds::core::status::OfferedIncompatibleQosStatus, dds::core::status::PublicationMatchedStatus, dds::core::status::RequestedDeadlineMissedStatus, dds::core::status::RequestedIncompatibleQosStatus, dds::core::status::SampleLostStatus, dds::core::status::SampleRejectedStatus, dds::core::status::SubscriptionMatchedStatus, dds::pub::CoherentSet, dds::pub::SuspendedPublication, dds::sub::CoherentAccess, dds::sub::GenerationCount, dds::sub::Rank, dds::sub::SampleInfo, dds::topic::BuiltinTopicKey, dds::topic::Filter, dds::topic::ParticipantBuiltinTopicData, dds::topic::PublicationBuiltinTopicData, dds::topic::SubscriptionBuiltinTopicData, dds::topic::TopicBuiltinTopicData, org::eclipse::cyclonedds::core::policy::ProductData, org::eclipse::cyclonedds::core::policy::Share, org::eclipse::cyclonedds::core::policy::SubscriptionKey, org::eclipse::cyclonedds::core::policy::TReaderLifespan, org::eclipse::cyclonedds::core::policy::TScheduling, org::eclipse::cyclonedds::topic::CMDataReaderBuiltinTopicData, org::eclipse::cyclonedds::topic::CMDataWriterBuiltinTopicData, org::eclipse::cyclonedds::topic::CMParticipantBuiltinTopicData, org::eclipse::cyclonedds::topic::CMPublisherBuiltinTopicData, org::eclipse::cyclonedds::topic::CMSubscriberBuiltinTopicData

Public Functions

Value &operator=(const Value &other)

Assigns new delegate to this Value

Parameters

otherValue

Value &operator=(Value &&other)

Moves delegate to this Value

Parameters

otherValue

bool operator==(const Value &other) const

Compare this Value with another Value

Parameters

otherValue

Returns

true if equal

bool operator!=(const Value &other) const

Compare this Value with another Value

Parameters

otherValue

Returns

true if not equal

D *operator->()

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();

Returns

a reference to delegate.

const D *operator->() const

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();

Returns

a reference to delegate.

Protected Functions

Value()
Value(const Value &p) = default
Value(Value &&p) = default

Protected Attributes

D d_
class dds::core::xtypes::VerbatimAnnotation : public dds::core::xtypes::Annotation

Public Functions

VerbatimAnnotation(const std::string &text)
const std::string &verbatim_text() const
class VerbatimAnnotation : public dds::core::xtypes::detail::Annotation
class dds::sub::status::ViewState : public std::bitset<OMG_DDS_STATE_BIT_COUNT>
#include <DataState.hpp>

Class to hold sample ViewState information.

For each instance (identified by the key), the Data Distribution Service internally maintains a view_state relative to each DataReader. The ViewSate can either be NEW_VIEW_STATE or NOT_NEW_VIEW_STATE.

    • Either this is the first time that the DataReader has ever accessed samples of that instance, or else that the DataReader has accessed previous samples of the instance, but the instance has since been reborn (i.e. become not-alive and then alive again).

    • The DataReader has already accessed samples of the same instance and that the instance has not been reborn since.

See

for more information: SampleInfo

Public Types

typedef std::bitset<OMG_DDS_STATE_BIT_COUNT> MaskType

Convenience typedef for std::bitset<OMG_DDS_STATE_BIT_COUNT>.

Public Functions

ViewState()

Construct a ViewState with default MaskType.

explicit ViewState(uint32_t m)

Construct a ViewState with MaskType of i.

Parameters

m – the MaskType

ViewState(const ViewState &src)

Copy constructor.

Construct a ViewState with existing ViewState.

Parameters

src – the ViewState to copy from

ViewState &operator=(const ViewState &src) = default

Copy assignment operator.

Copy the contents from one ViewState to another.

Parameters

src – the ViewState to copy from

Returns

reference to the ViewState instance that was copied to

ViewState(const MaskType &src)

Construct a ViewState with existing MaskType.

Parameters

src – the MaskType to copy from

Public Static Functions

static inline const ViewState new_view()

Get the NEW_VIEW_STATE.

new_view

  • Either this is the first time that the DataReader has ever accessed samples of that instance, or else that the DataReader has accessed previous samples of the instance, but the instance has since been reborn (i.e. become not-alive and then alive again).

Returns

the new_view ViewState

static inline const ViewState not_new_view()

Get the NOT_NEW_VIEW_STATE.

not_new_view

  • The DataReader has already accessed samples of the same instance and that the instance has not been reborn since.

Returns

the not_new_view ViewState

static inline const ViewState any()

Get any ViewState.

Either the sample has already been seen or not seen.

Returns

the any ViewState

class dds::core::cond::WaitSet : public dds::core::Reference
#include <WaitSet.hpp>

A WaitSet object allows an application to wait until one or more of the attached Condition objects has a trigger_value of TRUE or else until the timeout expires.

A WaitSet is not necessarily associated with a single DomainParticipant and could be used to wait for Condition objects associated with different DomainParticipant objects.

When using the wait() operation, the triggered Conditions are returned in a list.

// Create a Condition to attach to a Waitset
dds::core::cond::StatusCondition readerSC = dds::core::cond::StatusCondition(reader);
readerSC.enabled_statuses(dds::core::status::StatusMask::data_available());

// Create WaitSet and attach Condition
dds::core::cond::WaitSet waitset;
waitset.attach_condition(readerSC); // or waitset += readerSC;

dds::core::cond::WaitSet::ConditionSeq conditions;
while(true) {
    // Wait for any Condition to trigger.
    conditions = waitset.wait();

    // Loop through the triggered conditions.
    for (int i=0; i < conditions.size(); i++) {
        // Handle data_available when right Condition triggered.
        if (conditions[i] == readerSC) {
            // Read samples from the DataReader
        }
    }
}

When using the dispatch() operation, the Functors of the triggered Conditions will be called.

// Functor to add to a Condition
class FunctorStatusCondition {
public:
    void operator()(const dds::core::cond::StatusCondition& condition) {
        // Possibly get reader from the condition and read some samples.
    }
};
FunctorStatusCondition functor;

// Create a Condition with functor to attach to a Waitset
dds::core::cond::StatusCondition readerSC = dds::core::cond::StatusCondition(reader, functor);
readerSC.enabled_statuses(dds::core::status::StatusMask::data_available());

// Create WaitSet and attach Condition
dds::core::cond::WaitSet waitset;
waitset.attach_condition(readerSC); // or waitset += readerSC;

while(true) {
    // Wait for any Condition to trigger.
    // The functors of the Conditions are automatically called
    // when the Condition triggers.
    waitset.dispatch();
}

See

for more information: WaitSet concept

Public Types

typedef std::vector<dds::core::cond::Condition> ConditionSeq

Public Functions

WaitSet()

Create a WaitSet instance.

Throws
const ConditionSeq wait(const dds::core::Duration &timeout)

This operation allows an application thread to wait for the occurrence of at least one of the conditions that is attached to the WaitSet.

This operation allows an application thread to wait for the occurrence of certain Conditions. If none of the Conditions attached to the WaitSet have a trigger_value of TRUE, the wait operation will block suspending the calling thread.

The wait operation takes a timeout argument that specifies the maximum duration for the wait. If this duration is exceeded and none of the attached Condition objects is true, a TimeoutError will be thrown.

It is not allowed for more than one application thread to be waiting on the same WaitSet. If the wait operation is invoked on a WaitSet that already has a thread blocking on it, the operation will immediately raise a PreconditionNotMetError exception.

The result of the wait operation is the list of all the attached Conditions that have a trigger_value of TRUE (i.e., the Conditions that unblocked the wait).

Parameters

timeout – The maximum amount of time for which the wait should block while waiting for a Condition to be triggered.

Throws
Returns

ConditionSeq A vector containing the triggered Conditions

const ConditionSeq wait()

This operation allows an application thread to wait for the occurrence of at least one of the conditions that is attached to the WaitSet.

This operation allows an application thread to wait for the occurrence of certain Conditions. If none of the Conditions attached to the WaitSet have a trigger_value of TRUE, the wait operation will block suspending the calling thread.

It is not allowed for more than one application thread to be waiting on the same WaitSet. If the wait operation is invoked on a WaitSet that already has a thread blocking on it, the operation will immediately raise a PreconditionNotMetError exception.

The result of the wait operation is the list of all the attached Conditions that have a trigger_value of TRUE (i.e., the Conditions that unblocked the wait).

Throws
Returns

ConditionSeq A vector containing the triggered Conditions

ConditionSeq &wait(ConditionSeq &triggered, const dds::core::Duration &timeout)

This operation allows an application thread to wait for the occurrence of at least one of the conditions that is attached to the WaitSet.

This operation allows an application thread to wait for the occurrence of certain Conditions. If none of the Conditions attached to the WaitSet have a trigger_value of TRUE, the wait operation will block suspending the calling thread.

The wait operation takes a timeout argument that specifies the maximum duration for the wait. If this duration is exceeded and none of the attached Condition objects is true, a TimeoutError will be thrown.

It is not allowed for more than one application thread to be waiting on the same WaitSet. If the wait operation is invoked on a WaitSet that already has a thread blocking on it, the operation will immediately raise a PreconditionNotMetError exception.

The result of the wait operation is the list of all the attached Conditions that have a trigger_value of TRUE (i.e., the Conditions that unblocked the wait).

Parameters
  • triggered – A ConditionSeq in which to put Conditions that were triggered during the wait.

  • timeout – The maximum amount of time for which the wait should block while waiting for a Condition to be triggered.

Throws
Returns

ConditionSeq A vector containing the triggered Conditions

ConditionSeq &wait(ConditionSeq &triggered)

This operation allows an application thread to wait for the occurrence of at least one of the conditions that is attached to the WaitSet.

This operation allows an application thread to wait for the occurrence of certain Conditions. If none of the Conditions attached to the WaitSet have a trigger_value of TRUE, the wait operation will block suspending the calling thread.

It is not allowed for more than one application thread to be waiting on the same WaitSet. If the wait operation is invoked on a WaitSet that already has a thread blocking on it, the operation will immediately raise a PreconditionNotMetError exception.

The result of the wait operation is the list of all the attached Conditions that have a trigger_value of TRUE (i.e., the Conditions that unblocked the wait).

Parameters

triggered – A ConditionSeq in which to put Conditions that were triggered during the wait.

Throws
Returns

ConditionSeq A vector containing the triggered Conditions

void dispatch()

Waits for at least one of the attached Conditions to trigger and then dispatches the functor associated with the Condition.

Throws
void dispatch(const dds::core::Duration &timeout)

Waits for at least one of the attached Conditions to trigger and then dispatches the functor associated with the Condition, or, times out and throws a TimeoutError.

Parameters

timeout – The maximum amount of time for which the dispatch should block while waiting for a Condition to be triggered.

Throws
WaitSet &operator+=(const dds::core::cond::Condition &cond)

This operation attaches a Condition to the WaitSet.

Attaches a Condition to the WaitSet. It is possible to attach a Condition on a WaitSet that is currently being waited upon (via the wait operation). In this case, if the Condition has a trigger_value of TRUE, then attaching the Condition will unblock the WaitSet. Adding a Condition that is already attached to the WaitSet has no effect.

Parameters

cond – The Condition to be attached to this WaitSet.

Throws
Returns

WaitSet The WaitSet itself so that attaching Conditions can be chained.

WaitSet &operator-=(const dds::core::cond::Condition &cond)

This operation detaches a Condition to the WaitSet.

Detaches a Condition from the WaitSet. If the Condition was not attached to the WaitSet, the operation will return false.

Parameters

cond – The Condition to detach from this WaitSet

Throws
Returns

bool True if the Condition was found and detached, False if the Condition was not part of the WaitSet.

WaitSet &attach_condition(const dds::core::cond::Condition &cond)

This operation attaches a Condition to the WaitSet.

Attaches a Condition to the WaitSet. It is possible to attach a Condition on a WaitSet that is currently being waited upon (via the wait operation). In this case, if the Condition has a trigger_value of TRUE, then attaching the Condition will unblock the WaitSet. Adding a Condition that is already attached to the WaitSet has no effect.

Parameters

cond – The Condition to be attached to this WaitSet.

Throws
Returns

WaitSet The WaitSet itself so that attaching Conditions can be chained.

bool detach_condition(const dds::core::cond::Condition &cond)

This operation detaches a Condition to the WaitSet.

Detaches a Condition from the WaitSet. If the Condition was not attached to the WaitSet, the operation will return false.

Parameters

cond – The Condition to detach from this WaitSet

Throws
Returns

bool True if the Condition was found and detached, False if the Condition was not part of the WaitSet.

const ConditionSeq conditions() const

This operation retrieves the list of attached Conditions.

The resulting sequence will either be an empty sequence, meaning there were no conditions attached, or will contain a list of ReadCondition, QueryCondition, StatusCondition and GuardCondition.

Throws
Returns

ConditionSeq The list of attached Conditions.

ConditionSeq &conditions(ConditionSeq &conds) const

This operation retrieves the list of attached Conditions.

The resulting sequence will either be an empty sequence, meaning there were no conditions attached, or will contain a list of ReadCondition, QueryCondition, StatusCondition and GuardCondition.

Parameters

conds – A ConditionSeq in which to put the attached Conditions.

Throws
Returns

ConditionSeq The list of attached Conditions.

class org::eclipse::cyclonedds::core::cond::WaitSetDelegate : public org::eclipse::cyclonedds::core::DDScObjectDelegate

Public Types

typedef ::dds::core::smart_ptr_traits<WaitSetDelegate>::ref_type ref_type
typedef ::dds::core::smart_ptr_traits<WaitSetDelegate>::weak_ref_type weak_ref_type
typedef std::vector<dds::core::cond::Condition> ConditionSeq
typedef std::map<org::eclipse::cyclonedds::core::cond::ConditionDelegate*, dds::core::cond::Condition> ConditionMap
typedef std::map<org::eclipse::cyclonedds::core::cond::ConditionDelegate*, dds::core::cond::Condition>::iterator ConditionIterator
typedef std::map<org::eclipse::cyclonedds::core::cond::ConditionDelegate*, dds::core::cond::Condition>::const_iterator ConstConditionIterator
typedef std::pair<org::eclipse::cyclonedds::core::cond::ConditionDelegate*, dds::core::cond::Condition> ConditionEntry

Public Functions

WaitSetDelegate()
virtual ~WaitSetDelegate()
virtual void init(ObjectDelegate::weak_ref_type weak_ref)
virtual void close()
ConditionSeq &wait(ConditionSeq &triggered, const dds::core::Duration &timeout)
void dispatch(const dds::core::Duration &timeout)
void attach_condition(const dds::core::cond::Condition &cond)
bool detach_condition(org::eclipse::cyclonedds::core::cond::ConditionDelegate *cond)
ConditionSeq &conditions(ConditionSeq &conds) const

Private Members

ConditionMap conditions_
template<typename T>
class dds::core::WeakReference
#include <WeakReference.hpp>

The WeakReference class enables you to maintain a weak reference to a DDS reference type.

The existence of a weak link will not prevent the garbage collection of the reference type.

Public Types

typedef T ReferenceType

Public Functions

WeakReference()

Creates a weak reference without an referenced dds object.

WeakReference(const T &t)

Creates a weak reference for the reference type passed as argument.

Parameters

t – dds object the new weak reference will refer to

bool expired()

Checks whether the underlying reference has been deleted.

Returns

true if the underlying reference has expired, false otherwise

T lock()

Gives access to the underlying shared reference.

If the reference has expired the returned object will be referencing ‘dds::core::null’.

Returns

referenced dds object

Private Members

T::DELEGATE_WEAK_REF_T impl_
template<typename T>
struct org::eclipse::cyclonedds::core::WeakReferenceSet

Public Types

typedef std::set<T, std::owner_less<T>> wset
typedef std::set<T, std::owner_less<T>>::iterator iterator
class dds::core::policy::WriterDataLifecycle : public dds::core::Value
#include <CorePolicy.hpp>

Public Functions

explicit WriterDataLifecycle(bool autodispose_unregistered_instances = true)

Creates a WriterDataLifecycle QoS instance

Parameters

autodispose_unregistered_instances – a boolean indicating if unregistered instances should be autodisposed

WriterDataLifecycle(const WriterDataLifecycle &other)

Copies a WriterDataLifecycle QoS instance

Parameters

other – the WriterDataLifecycle QoS instance to copy

WriterDataLifecycle &operator=(const WriterDataLifecycle &other) = default

Copies a WriterDataLifecycle QoS instance

Parameters

other – the WriterDataLifecycle QoS instance to copy

Returns

reference to the WriterDataLifecycle QoS instance that was copied to

bool autodispose_unregistered_instances() const

Gets a boolean indicating if unregistered instances should be autodisposed

Returns

a boolean indicating if unregistered instances should be autodisposed

WriterDataLifecycle &autodispose_unregistered_instances(bool autodispose_unregistered_instances)

Sets a boolean indicating if unregistered instances should be autodisposed

Parameters

autodispose_unregistered_instances – a boolean indicating if unregistered instances should be autodisposed

Public Static Functions

static WriterDataLifecycle AutoDisposeUnregisteredInstances()
Returns

a WriterDataLifecycle QoS instance with autodispose_unregistered_instances set to true

static WriterDataLifecycle ManuallyDisposeUnregisteredInstances()
Returns

a WriterDataLifecycle QoS instance with autodispose_unregistered_instances set to false

class org::eclipse::cyclonedds::core::policy::WriterDataLifecycleDelegate

Public Functions

WriterDataLifecycleDelegate(const WriterDataLifecycleDelegate &other)
explicit WriterDataLifecycleDelegate(bool autodispose)
bool autodispose() const
void autodispose(bool b)
bool operator==(const WriterDataLifecycleDelegate &other) const
WriterDataLifecycleDelegate &operator=(const WriterDataLifecycleDelegate &other) = default
void check() const
void set_iso_policy(const dds_qos_t *qos)
void set_c_policy(dds_qos_t *qos) const

Private Members

bool autodispose_
namespace dds
namespace code
namespace xtypes
namespace detail
namespace dds::core

Typedefs

typedef std::vector<uint8_t> ByteSeq

Use a std::vector<uint8_t> to hold a sequence of bytes.

typedef std::vector<std::string> StringSeq

Use a std::vector<std::string> to hold a sequence of bytes.

Functions

const Duration operator*(uint64_t lhs, const Duration &rhs)

Multiply Duration by a factor

Parameters
  • lhs – factor by which to multiply

  • rhsDuration to multiply

Returns

factor * Duration

const Duration operator*(const Duration &lhs, uint64_t rhs)

Multiply Duration by a factor

Parameters
  • lhsDuration to multiply

  • rhs – factor by which to multiply

Returns

Duration * factor

const Duration operator/(const Duration &lhs, uint64_t rhs)

Divide Duration by a factor

Parameters
  • lhsDuration to divide

  • rhs – factor by which to divide

Variables

const int32_t LENGTH_UNLIMITED = -1
const null_type null

This is the DDS Null-Reference.

A dds reference object that doesn’t reference to anything can be compared with this object.

dds::domain::DomainParticipant participant = dds::core::null;
...
if (participant == dds::core::null) {
    // The participant is not yet properly created.
    // Using it now will trigger the dds::core::NullReferenceError exception.
}

namespace cond
namespace dds::core::cond::detail
namespace dds::core::detail
namespace policy
namespace dds::core::policy::detail

Typedefs

typedef dds::core::policy::Deadline<org::eclipse::cyclonedds::core::policy::DeadlineDelegate> Deadline
typedef dds::core::policy::DestinationOrder<org::eclipse::cyclonedds::core::policy::DestinationOrderDelegate> DestinationOrder
typedef dds::core::policy::Durability<org::eclipse::cyclonedds::core::policy::DurabilityDelegate> Durability
typedef dds::core::policy::EntityFactory<org::eclipse::cyclonedds::core::policy::EntityFactoryDelegate> EntityFactory
typedef dds::core::policy::GroupData<org::eclipse::cyclonedds::core::policy::GroupDataDelegate> GroupData
typedef dds::core::policy::History<org::eclipse::cyclonedds::core::policy::HistoryDelegate> History
typedef dds::core::policy::LatencyBudget<org::eclipse::cyclonedds::core::policy::LatencyBudgetDelegate> LatencyBudget
typedef dds::core::policy::Lifespan<org::eclipse::cyclonedds::core::policy::LifespanDelegate> Lifespan
typedef dds::core::policy::Liveliness<org::eclipse::cyclonedds::core::policy::LivelinessDelegate> Liveliness
typedef dds::core::policy::Ownership<org::eclipse::cyclonedds::core::policy::OwnershipDelegate> Ownership
typedef dds::core::policy::Partition<org::eclipse::cyclonedds::core::policy::PartitionDelegate> Partition
typedef dds::core::policy::Presentation<org::eclipse::cyclonedds::core::policy::PresentationDelegate> Presentation
typedef dds::core::policy::ReaderDataLifecycle<org::eclipse::cyclonedds::core::policy::ReaderDataLifecycleDelegate> ReaderDataLifecycle
typedef dds::core::policy::Reliability<org::eclipse::cyclonedds::core::policy::ReliabilityDelegate> Reliability
typedef dds::core::policy::ResourceLimits<org::eclipse::cyclonedds::core::policy::ResourceLimitsDelegate> ResourceLimits
typedef dds::core::policy::TimeBasedFilter<org::eclipse::cyclonedds::core::policy::TimeBasedFilterDelegate> TimeBasedFilter
typedef dds::core::policy::TopicData<org::eclipse::cyclonedds::core::policy::TopicDataDelegate> TopicData
typedef dds::core::policy::TransportPriority<org::eclipse::cyclonedds::core::policy::TransportPriorityDelegate> TransportPriority
typedef dds::core::policy::UserData<org::eclipse::cyclonedds::core::policy::UserDataDelegate> UserData
typedef dds::core::policy::WriterDataLifecycle<org::eclipse::cyclonedds::core::policy::WriterDataLifecycleDelegate> WriterDataLifecycle
typedef dds::core::policy::QosPolicyCount<org::eclipse::cyclonedds::core::policy::QosPolicyCountDelegate> QosPolicyCount
namespace status
namespace dds::core::status::detail

Typedefs

typedef dds::core::status::InconsistentTopicStatus<org::eclipse::cyclonedds::core::InconsistentTopicStatusDelegate> InconsistentTopicStatus
typedef dds::core::status::LivelinessChangedStatus<org::eclipse::cyclonedds::core::LivelinessChangedStatusDelegate> LivelinessChangedStatus
typedef dds::core::status::LivelinessLostStatus<org::eclipse::cyclonedds::core::LivelinessLostStatusDelegate> LivelinessLostStatus
typedef dds::core::status::OfferedDeadlineMissedStatus<org::eclipse::cyclonedds::core::OfferedDeadlineMissedStatusDelegate> OfferedDeadlineMissedStatus
typedef dds::core::status::OfferedIncompatibleQosStatus<org::eclipse::cyclonedds::core::OfferedIncompatibleQosStatusDelegate> OfferedIncompatibleQosStatus
typedef dds::core::status::PublicationMatchedStatus<org::eclipse::cyclonedds::core::PublicationMatchedStatusDelegate> PublicationMatchedStatus
typedef dds::core::status::SampleRejectedStatus<org::eclipse::cyclonedds::core::SampleRejectedStatusDelegate> SampleRejectedStatus
typedef dds::core::status::RequestedDeadlineMissedStatus<org::eclipse::cyclonedds::core::RequestedDeadlineMissedStatusDelegate> RequestedDeadlineMissedStatus
typedef dds::core::status::RequestedIncompatibleQosStatus<org::eclipse::cyclonedds::core::RequestedIncompatibleQosStatusDelegate> RequestedIncompatibleQosStatus
typedef dds::core::status::SampleLostStatus<org::eclipse::cyclonedds::core::SampleLostStatusDelegate> SampleLostStatus
typedef dds::core::status::SubscriptionMatchedStatus<org::eclipse::cyclonedds::core::SubscriptionMatchedStatusDelegate> SubscriptionMatchedStatus
namespace dds::core::xtypes

Typedefs

typedef Annotation<detail::Annotation> Annotation
typedef IdAnnotation<detail::IdAnnotation> IdAnnotation
typedef KeyAnnotation<detail::KeyAnnotation> KeyAnnotation
typedef SharedAnnotation<detail::SharedAnnotation> SharedAnnotation
typedef NestedAnnotation<detail::NestedAnnotation> NestedAnnotation
typedef ExtensibilityAnnotation<detail::ExtensibilityAnnotation> ExtensibilityAnnotation
typedef MustUnderstandAnnotation<detail::MustUnderstandAnnotation> MustUnderstandAnnotation
typedef VerbatimAnnotation<detail::VerbatimAnnotation> VerbatimAnnotation
typedef BitsetAnnotation<detail::BitsetAnnotation> BitsetAnnotation
typedef BitBoundAnnotation<detail::BitBoundAnnotation> BitBoundAnnotation

Functions

template<typename T>
PrimitiveType<T> PrimitiveType()

Primitive type constructor. This function can be used as follows:

DynamicType int16Type = PrimitiveType<int16_t>();

template<typename DDT, typename T>
void value(DDT &dd, uint32_t mid, const T &v)
template<typename DDT, typename T>
T value(const DDT &dd, const std::string &mid, const T &v)
template<typename DDT, typename T>
T value(const DDT &dd, uint32_t mid)
template<typename DDT, typename T>
T value(const DDT &dd, const std::string &mid)
template<typename T>
bool isOptional(const MemberType<T> &m)
template<typename T>
bool isShared(const MemberType<T> &m)
template<typename T>
bool isKey(const MemberType<T> &m)
template<typename T>
bool isMustUnderstand(const MemberType<T> &m)
template<typename T>
bool isBitset(const MemberType<T> &m)
template<typename T>
bool hasBitbound(const MemberType<T> &m)
template<typename T>
int32_t getBitbound(const MemberType<T> &m)
template<typename T>
bool hasId(const MemberType<T> &m)
template<typename T>
int32_t getId(const MemberType<T> &m)
template<typename T>
bool isFinal(const StructType<T> &s)
template<typename T>
bool isExtensible(const StructType<T> &s)
template<typename T>
bool isMutable(const StructType<T> &s)
template<typename T>
bool isNested(const StructType<T> &s)
namespace dds::core::xtypes::annotation

Variables

dds::core::xtypes::IdAnnotation Id(uint32_t)
namespace dds::core::xtypes::detail

Functions

template<typename T>
bool isFinal(const StructType<T> &s)
template<typename T>
bool isExtensible(const StructType<T> &s)
template<typename T>
bool isMutable(const StructType<T> &s)
template<typename T>
bool isNested(const StructType<T> &s)
namespace dds::domain

Functions

void ignore(const dds::domain::DomainParticipant &dp, const dds::core::InstanceHandle &handle)

This function enables you to ignore the entity represented by the given InstanceHandle for the specific DomainParticipant.

Parameters
  • dp – the DomainParticipant for which the remote entity will be ignored

  • handle – the InstanceHandle of the remote entity that has to be ignored

template<typename FwdIterator>
void ignore(const dds::domain::DomainParticipant &dp, FwdIterator begin, FwdIterator end)

This function enables you to ignore a series of entities whose instance handles are made available via the provided iterators.

Ignore publications.

Ignore subscriptions.

This operation allows an application to instruct the Service to locally ignore a remote domain participant. From that point onwards the Service will locally behave as if the remote participant did not exist. This means it will ignore any Topic, publication, or subscription that originates on that domain participant.

Parameters
  • dp – the DomainParticipant for which the remote entity will be ignored

  • begin – the begin iterator for the InstanceHandle to ignore

  • end – the end iterator for the InstanceHandle to ignore

  • dp – the DomainParticipant for which the remote entity will be ignored

  • begin – an iterator indicating the beginning of a sequence of InstanceHandles of the remote Entity that has to be ignored

  • end – an iterator indicating the end of a sequence of InstanceHandles of the remote Entity that has to be ignored

  • dp – the DomainParticipant for which the remote entity will be ignored

  • begin – the start of the range to be ignored

  • end – the end of the range to be ignored

  • dp – the DomainParticipant

  • begin – a forward iterator pointing to the beginning of a sequence of InstanceHandles to ignore

  • end – a forward iterator pointing to the end of a sequence of InstanceHandles to ignore

DomainParticipant find(uint32_t id)

This operation retrieves a previously-created DomainParticipant belonging to the specified domain_id. If no such DomainParticipant exists, the operation will return a dds::core::null DomainParticipant.

Parameters

id – the domain id

namespace dds::domain::detail
namespace qos
namespace detail
namespace dds::pub

Functions

template<typename FwdIterator>
void ignore(const dds::domain::DomainParticipant &dp, FwdIterator begin, FwdIterator end)

Ignore publications.

Parameters
  • dp – the DomainParticipant for which the remote entity will be ignored

  • begin – an iterator indicating the beginning of a sequence of InstanceHandles of the remote Entity that has to be ignored

  • end – an iterator indicating the end of a sequence of InstanceHandles of the remote Entity that has to be ignored

template<typename T>
::dds::core::InstanceHandleSeq matched_subscriptions(const dds::pub::DataWriter<T> &dw)

This operation retrieves the list of subscriptions currently “associated” with the DataWriter. That is, subscriptions that have a matching Topic and compatible QoS that the application has not indicated should be “ignored” by means of the dds::sub::ignore operation on the DomainParticipant class.

The handles returned in the dds::core::InstanceHandleSeq are the ones that are used by the DDS implementation to locally identify the corresponding matched DataReader entities. You can access more detailed information about a particular subscription by passing its subscription_handle to either the dds::pub::matched_subscription_data operation or to the read with instance operation on the built-in reader for the “DCPSSubscription” topic.

The operation may fail if the infrastructure does not locally maintain the connectivity information. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In such cases the operation will throw UnsupportedError.

See Builtin Topics for more information.

Note

Be aware that since InstanceHandle is an opaque datatype, it does not necessarily mean that the handles obtained from the matched_subscriptions operation have the same value as the ones that appear in the instance_handle field of the SampleInfo when retrieving the subscription info through corresponding “DCPSSubscriptions” built-in reader. You can’t just compare two handles to determine whether they represent the same subscription. If you want to know whether two handles actually do represent the same subscription, use both handles to retrieve their corresponding SubscriptionBuiltinTopicData samples and then compare the key field of both samples.

Parameters

dw – the DataWriter

Throws
Returns

a sequence of handles

template<typename T, typename FwdIterator>
uint32_t matched_subscriptions(const dds::pub::DataWriter<T> &dw, FwdIterator begin, uint32_t max_size)

This operation retrieves the list of subscriptions currently “associated” with the DataWriter. That is, subscriptions that have a matching Topic and compatible QoS that the application has not indicated should be “ignored” by means of the dds::sub::ignore operation on the DomainParticipant class.

The handles returned in the dds::core::InstanceHandleSeq are the ones that are used by the DDS implementation to locally identify the corresponding matched DataReader entities. You can access more detailed information about a particular subscription by passing its subscription_handle to either the dds::pub::matched_subscription_data operation or to the read with instance operation on the built-in reader for the “DCPSSubscription” topic.

The operation may fail if the infrastructure does not locally maintain the connectivity information. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In such cases the operation will throw UnsupportedError.

See Builtin Topics for more information.

Note

Be aware that since InstanceHandle is an opaque datatype, it does not necessarily mean that the handles obtained from the matched_subscriptions operation have the same value as the ones that appear in the instance_handle field of the SampleInfo when retrieving the subscription info through corresponding “DCPSSubscriptions” built-in reader. You can’t just compare two handles to determine whether they represent the same subscription. If you want to know whether two handles actually do represent the same subscription, use both handles to retrieve their corresponding SubscriptionBuiltinTopicData samples and then compare the key field of both samples.

Parameters
  • dw – the DataWriter

  • begin – an iterator indicating the beginning of a sequence of instance handles in which to put the matched subscriptions

  • max_size – the maximum number of matched subscriptions to return

Throws
Returns

the number of matched subscriptions returned

template<typename T>
const dds::topic::SubscriptionBuiltinTopicData matched_subscription_data(const dds::pub::DataWriter<T> &dw, const ::dds::core::InstanceHandle &h)

This operation retrieves information on the specified subscription that is currently “associated” with the DataWriter. That is, a subscription with a matching Topic and compatible QoS that the application has not indicated should be “ignored” by means of the dds::sub::ignore operation on the DomainParticipant class.

The subscription_handle must correspond to a subscription currently associated with the DataWriter, otherwise the operation will fail and throw InvalidArgumentError. The operation dds::pub::matched_subscriptions can be used to find the subscriptions that are currently matched with the DataWriter.

The operation may fail if the infrastructure does not locally maintain the connectivity information. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In such cases the operation will throw UnsupportedError.

See also DCPS_Builtin_Topics and DCPS_Builtin_Topics_SubscriptionData.

Parameters
Throws
Returns

the SubscriptionBuiltinTopicData

template<typename WRITER, typename FwdIterator>
uint32_t find(const dds::pub::Publisher &pub, const std::string &topic_name, FwdIterator begin, uint32_t max_size)

This function retrieves previously-created DataWriters belonging to the Publisher that is attached to a Topic with a matching topic_name. If no such DataWriter exists, the operation will return an empty container.

Parameters
  • pub – the Publisher to find an associated DataWriter for

  • topic_name – the topic name

  • begin – a iterator for a sequence in which to put found DataWriters

  • max_size – the maximum number of DataWriters to return

Returns

the total number of elements found. Notice that at most max_size will be copied using the provided iterator

template<typename WRITER, typename BinIterator>
uint32_t find(const dds::pub::Publisher &pub, const std::string &topic_name, BinIterator begin)

This function retrieves previously-created DataWriters belonging to the Publisher that is attached to a Topic with a matching topic_name. If no such DataWriter exists, the operation will return an empty container.

Parameters
  • pub – the Publisher to find an associated DataWriter for

  • topic_name – the topic name

  • begin – a back insertion iterator for a sequence in which to put found DataWriters

Returns

the total number of elements found. Notice that at most max_size will be copied using the provided iterator.

void ignore(const dds::domain::DomainParticipant &dp, const dds::core::InstanceHandle &handle)

Ignore publications.

Parameters
  • dp – the DomainParticipant for which the remote entity will be ignored

  • handle – the InstanceHandle of the remote entity that has to be ignored

namespace dds::pub::detail
namespace qos
namespace detail
namespace dds::sub

Functions

template<typename T, template<typename Q> class D>
LoanedSamples<T, D> move(LoanedSamples<T, D> &a)

Move loan and its ownership to a new LoanedSamples object.

Returns

LoanedSampless

template<typename SELECTOR>
SELECTOR &read(SELECTOR &selector)
template<typename SELECTOR>
SELECTOR &take(SELECTOR &selector)
inline dds::sub::functors::MaxSamplesManipulatorFunctor max_samples(uint32_t n)
inline dds::sub::functors::ContentFilterManipulatorFunctor content(const dds::sub::Query &query)
inline dds::sub::functors::StateFilterManipulatorFunctor state(const dds::sub::status::DataState &s)
inline dds::sub::functors::InstanceManipulatorFunctor instance(const dds::core::InstanceHandle &h)
inline dds::sub::functors::NextInstanceManipulatorFunctor next_instance(const dds::core::InstanceHandle &h)
template<typename FwdIterator>
void ignore(const dds::domain::DomainParticipant &dp, FwdIterator begin, FwdIterator end)

Ignore subscriptions.

Parameters
  • dp – the DomainParticipant for which the remote entity will be ignored

  • begin – the start of the range to be ignored

  • end – the end of the range to be ignored

template<typename T>
::dds::core::InstanceHandleSeq matched_publications(const dds::sub::DataReader<T> &dr)

This operation retrieves the list of publications currently “associated” with the DataReader. That is, subscriptions that have a matching Topic and compatible QoS that the application has not indicated should be “ignored” by means of the ignore_publication operation on the DomainParticipant.

The handles returned in the dds::core::InstanceHandleSeq are the ones that are used by the DDS implementation to locally identify the corresponding matched DataWriter entities. You can access more detailed information about a particular publication by passing its publication_handle to either the dds::sub::matched_publication_data operation or to the read with instance operation on the built-in reader for the “DCPSPublication” topic.

The operation may fail if the infrastructure does not locally maintain the connectivity information. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In such cases the operation will throw UnsupportedError.

See Builtin Topics for more information.

Note

Be aware that since InstanceHandle_t is an opaque datatype, it does not necessarily mean that the handles obtained from the get_matched_publications operation have the same value as the ones that appear in the instance_handle field of the SampleInfo when retrieving the publication info through corresponding “DCPSPublications” built-in reader. You can’t just compare two handles to determine whether they represent the same publication. If you want to know whether two handles actually do represent the same publication, use both handles to retrieve their corresponding PublicationBuiltinTopicData samples and then compare the key field of both samples.

Parameters

dr – the DataReader

Throws
Returns

a sequence of handles

template<typename T, typename FwdIterator>
uint32_t matched_publications(const dds::sub::DataReader<T> &dr, FwdIterator begin, uint32_t max_size)

This operation retrieves the list of publications currently “associated” with the DataReader. That is, subscriptions that have a matching Topic and compatible QoS that the application has not indicated should be “ignored” by means of the ignore_publication operation on the DomainParticipant.

The handles returned in the dds::core::InstanceHandleSeq are the ones that are used by the DDS implementation to locally identify the corresponding matched DataWriter entities. You can access more detailed information about a particular publication by passing its publication_handle to either the dds::sub::matched_publication_data operation or to the read with instance operation on the built-in reader for the “DCPSPublication” topic.

The operation may fail if the infrastructure does not locally maintain the connectivity information. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In such cases the operation will throw UnsupportedError.

See Builtin Topics for more information.

Note

Be aware that since InstanceHandle_t is an opaque datatype, it does not necessarily mean that the handles obtained from the get_matched_publications operation have the same value as the ones that appear in the instance_handle field of the SampleInfo when retrieving the publication info through corresponding “DCPSPublications” built-in reader. You can’t just compare two handles to determine whether they represent the same publication. If you want to know whether two handles actually do represent the same publication, use both handles to retrieve their corresponding PublicationBuiltinTopicData samples and then compare the key field of both samples.

Parameters
  • dr – the DataReader

  • begin – an iterator indicating the beginning of a sequence of instance handles in which to put the matched subscriptions

  • max_size – the maximum number of matched subscriptions to return

Throws
Returns

the number of matched subscriptions returned

template<typename T>
const dds::topic::PublicationBuiltinTopicData matched_publication_data(const dds::sub::DataReader<T> &dr, const ::dds::core::InstanceHandle &h)

This operation retrieves information on the specified publication that is currently “associated” with the DataReader. That is, a publication with a matching Topic and compatible QoS that the application has not indicated should be “ignored” by means of the ignore_publication operation on the DomainParticipant. The publication_handle must correspond to a publication currently associated with the DataReader, otherwise the operation will fail and throw InvalidArgumentError. The operation dds::sub::matched_publications can be used to find the publications that are currently matched with the DataReader.

The operation may fail if the infrastructure does not locally maintain the connectivity information. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In such cases the operation will throw UnsupportedError.

See also DCPS_Builtin_Topics and DCPS_Builtin_Topics_PublicationData.

Parameters
Throws
Returns

the PublicationBuiltinTopicData

template<typename READER, typename FwdIterator>
uint32_t find(const dds::sub::Subscriber &sub, const std::string &topic_name, FwdIterator begin, uint32_t max_size)

This function retrieves a previously-created DataReader belonging to the Subscriber that is attached to a Topic with a matching topic_name. If no such DataReader exists, the operation will return an empty container.

The use of this operation on the built-in Subscriber allows access to the built-in DataReader entities for the built-in topics (see Builtin Topics).

Parameters
  • sub – the Subscriber for which to find a DataReader

  • topic_name – the topic name to find

  • begin – a forward iterator pointing to the start of a container in which to put the DataReaders

  • max_size – the number of DataReaders to return

Returns

the total number of elements returned. Notice that at most max_size will be copied using the provided iterator

template<typename READER, typename BinIterator>
uint32_t find(const dds::sub::Subscriber &sub, const std::string &topic_name, BinIterator begin)

This function retrieves a previously-created DataReader belonging to the Subscriber that is attached to a Topic with a matching topic_name. If no such DataReader exists, the operation will return an empty container.

The use of this operation on the built-in Subscriber allows access to the built-in DataReader entities for the built-in topics (see Builtin Topics).

Parameters
  • sub – the Subscriber for which to find a DataReader

  • topic_name – the topic name to find

  • begin – a back inserting iterator pointing to the start of a container in which to put the DataReaders

Returns

the total number of elements returned

template<typename READER, typename T, typename FwdIterator>
uint32_t find(const dds::sub::Subscriber &sub, const dds::topic::TopicDescription &topic_description, FwdIterator begin, uint32_t max_size)

This function retrieves a previously-created DataReader belonging to the Subscriber that is attached to a Topic with a matching topic_name. If no such DataReader exists, the operation will return an empty container.

The use of this operation on the built-in Subscriber allows access to the built-in DataReader entities for the built-in topics (see Builtin Topics).

Parameters
  • sub – the Subscriber for which to find a DataReader

  • topic_description – the topic description to find

  • begin – a forward iterator pointing to the start of a container in which to put the DataReaders

  • max_size – the number of DataReaders to return

Returns

the total number of elements returned. Notice that at most max_size will be copied using the provided iterator

template<typename READER, typename T, typename BinIterator>
uint32_t find(const dds::sub::Subscriber &sub, const dds::topic::TopicDescription &topic_description, BinIterator begin)

This function retrieves a previously-created DataReader belonging to the Subscriber that is attached to a Topic with a matching topic_name. If no such DataReader exists, the operation will return an empty container.

The use of this operation on the built-in Subscriber allows access to the built-in DataReader entities for the built-in topics (see Builtin Topics).

Parameters
  • sub – the Subscriber for which to find a DataReader

  • topic_description – the topic description to find

  • begin – a back inserting iterator pointing to the start of a container in which to put the DataReaders

Returns

the total number of elements returned

template<typename READER, typename FwdIterator>
uint32_t find(const dds::sub::Subscriber &sub, const dds::sub::status::DataState &rs, FwdIterator begin, uint32_t max_size)

This operation allows the application to access the DataReader objects that contain samples with the specified sample_states, view_states, and instance_states.

If the Presentation QosPolicy of the Subscriber to which the DataReader belongs has the access_scope set to ‘GROUP’, this operation should only be invoked inside a begin_access/end_access block. Otherwise it will throw error PreconditionNotMetError.

Depending on the setting of the dds::core::policy::Presentation QoSPolicy, the returned collection of DataReader objects may be:

  • a ‘set’ containing each DataReader at most once in no specified order,

  • a ‘list’ containing each DataReader one or more times in a specific order.

This difference is due to the fact that, in the second situation it is required to access samples belonging to different DataReader objects in a particular order. In this case, the application should process each DataReader in the same order it appears in the ‘list’ and read or take exactly one sample from each DataReader. The patterns that an application should use to access data is fully described in dds::core::policy::Presentation.

Parameters
  • sub – the Subscriber for which to find a DataReader

  • data_state – the data_state to find

  • begin – a forward iterator pointing to the start of a container in which to put the DataReaders

  • max_size – the number of DataReaders to return

Returns

the total number of elements returned. Notice that at most max_size will be copied using the provided iterator

template<typename READER, typename BinIterator>
uint32_t find(const dds::sub::Subscriber &sub, const dds::sub::status::DataState &rs, BinIterator begin)

This operation allows the application to access the DataReader objects that contain samples with the specified sample_states, view_states, and instance_states.

If the Presentation QosPolicy of the Subscriber to which the DataReader belongs has the access_scope set to ‘GROUP’, this operation should only be invoked inside a begin_access/end_access block. Otherwise it will throw error PreconditionNotMetError.

Depending on the setting of the dds::core::policy::Presentation QoSPolicy, the returned collection of DataReader objects may be:

  • a ‘set’ containing each DataReader at most once in no specified order,

  • a ‘list’ containing each DataReader one or more times in a specific order.

This difference is due to the fact that, in the second situation it is required to access samples belonging to different DataReader objects in a particular order. In this case, the application should process each DataReader in the same order it appears in the ‘list’ and read or take exactly one sample from each DataReader. The patterns that an application should use to access data is fully described in dds::core::policy::Presentation.

Parameters
  • sub – the Subscriber for which to find a DataReader

  • rs – the data_state to find

  • begin – a back inserting iterator pointing to the start of a container in which to put the DataReaders

Returns

the total number of elements returned

void ignore(const dds::domain::DomainParticipant &dp, const dds::core::InstanceHandle &handle)

Ignore subscriptions.

Parameters
  • dp – the DomainParticipant for which the remote entity will be ignored

  • handle – the InstanceHandle of the remote entity that has to be ignored

const dds::sub::Subscriber builtin_subscriber(const dds::domain::DomainParticipant &dp)

This operation returns the built-in Subscriber associated with the given given DomainParticipant.

Each DomainParticipant contains several built-in Topic objects. The built-in Subscriber contains the corresponding DataReader objects to access them. All these DataReader objects belong to a single built-in Subscriber. Note that there is exactly one built-in Subscriber associated with each DomainParticipant.

See Builtin Topics for more information.

Parameters

dp – the domain participant

Returns

the built-in Subscriber

namespace cond
namespace dds::sub::cond::detail

Typedefs

typedef dds::sub::cond::QueryCondition<org::eclipse::cyclonedds::sub::cond::QueryConditionDelegate> QueryCondition
typedef dds::sub::cond::ReadCondition<org::eclipse::cyclonedds::sub::cond::ReadConditionDelegate> ReadCondition
namespace dds::sub::detail

Typedefs

typedef dds::sub::AnyDataReader<org::eclipse::cyclonedds::sub::AnyDataReaderDelegate> AnyDataReader
typedef ::dds::sub::CoherentAccess<org::eclipse::cyclonedds::sub::CoherentAccessDelegate> CoherentAccess
typedef dds::sub::GenerationCount<org::eclipse::cyclonedds::sub::GenerationCountImpl> GenerationCount
typedef dds::sub::Query<org::eclipse::cyclonedds::sub::QueryDelegate> Query
typedef dds::sub::Rank<org::eclipse::cyclonedds::sub::RankImpl> Rank
typedef dds::sub::SampleInfo<org::eclipse::cyclonedds::sub::SampleInfoImpl> SampleInfo
typedef dds::sub::Subscriber<org::eclipse::cyclonedds::sub::SubscriberDelegate> Subscriber
typedef std::vector<org::eclipse::cyclonedds::sub::AnyDataReaderDelegate::ref_type> base_readers_vector
typedef std::vector<org::eclipse::cyclonedds::sub::AnyDataReaderDelegate::ref_type>::iterator base_readers_iterator
namespace functors
namespace detail
namespace qos
namespace detail
namespace status
namespace dds::topic

Functions

template<typename TOPIC>
TOPIC discover(const dds::domain::DomainParticipant &dp, const std::string &topic_name, const dds::core::Duration &timeout)

This operation gives access to an specific existing (or ready to exist) enabled Topic, ContentFilteredTopic, MultiTopic, AnyTopic or TopicDescription based on its topic_name.

Topics that the application has indicated should be ‘ignored’ (by means of the dds::topic::ignore operation) will not appear in this list (note: the ignore feature is not yet supported).

If a Topic of the same topic_name already exists, it gives access to this Topic. Otherwise it waits (blocks the caller) until another mechanism creates it. This other mechanism can be another thread, a configuration tool, or some other Data Distribution Service utility. If after the specified timeout the Topic can still not be found, the caller gets unblocked and the returned Topic will be dds::core::null.

A Topic that is obtained by means of find_topic in a specific DomainParticipant can only be used to create DataReaders and DataWriters in that DomainParticipant.

This operation usually results in network look-ups.

For finding only locally created Topics, look here.

Parameters
  • dp – the DomainParticipant

  • name – the topic name to discover

  • timeout – the time out

Throws
template<typename ANYTOPIC, typename FwdIterator>
uint32_t discover(const dds::domain::DomainParticipant &dp, FwdIterator begin, uint32_t max_size)

This operation retrieves a list of Topics that have been discovered in the domain.

If the max_size of the given list is large enough, all discovered Topics will be present in that list. Otherwise, a random sub-set of max_size elements is returned.

Topics that the application has indicated should be ‘ignored’ (by means of the dds::topic::ignore operation) will not appear in this list (note: the ignore feature is not yet supported).

Because Topics of various different kinds can be retrieved, the list contains AnyTopics.

This operation usually results in network look-ups.

Parameters
  • dp – the DomainParticipant

  • begin – a forward iterator pointing to the beginning of a container in which to insert the topics

  • max_size – the maximum number of topics to return

template<typename ANYTOPIC, typename BinIterator>
uint32_t discover_all(const dds::domain::DomainParticipant &dp, BinIterator begin)

This operation retrieves a list of all Topics that have been discovered in the domain.

Topics that the application has indicated should be ‘ignored’ (by means of the dds::topic::ignore operation) will not appear in this list (note: the ignore feature is not yet supported).

Because Topics of various different kinds can be retrieved, the list contains AnyTopics.

This operation usually results in network look-ups.

Parameters
  • dp – the DomainParticipant

  • begin – a back inserting iterator pointing to the beginning of a container in which to insert the topics

template<typename FwdIterator>
void ignore(const dds::domain::DomainParticipant &dp, FwdIterator begin, FwdIterator end)

This operation allows an application to instruct the Service to locally ignore a remote domain participant. From that point onwards the Service will locally behave as if the remote participant did not exist. This means it will ignore any Topic, publication, or subscription that originates on that domain participant.

Parameters
  • dp – the DomainParticipant

  • begin – a forward iterator pointing to the beginning of a sequence of InstanceHandles to ignore

  • end – a forward iterator pointing to the end of a sequence of InstanceHandles to ignore

template<typename TOPIC>
TOPIC find(const dds::domain::DomainParticipant &dp, const std::string &topic_name)

This operation gives access to a locally-created Topic, ContentFilteredTopic, MultiTopic, AnyTopic and TopicDescription with a matching name.

dds::topic::find will never create a Topic but returns a reference to an Topic proxy that already exists locally. When no local proxy exists, the returned Topic will be a dds::core::null object. The operation never blocks.

For discovering globally available Topics, look here.

Parameters
  • dp – the DomainParticipant to find the topic on

  • topic_name – the topic name to find

void ignore(const dds::domain::DomainParticipant &dp, const dds::core::InstanceHandle &handle)

This operation allows an application to instruct the Service to locally ignore a remote domain participant. From that point onwards the Service will locally behave as if the remote participant did not exist. This means it will ignore any Topic, publication, or subscription that originates on that domain participant.

Parameters
  • dp – the DomainParticipant

  • handle – the handle of the DomainParticipant to ignore

namespace dds::topic::detail
namespace qos
namespace detail
namespace org
namespace eclipse
namespace cyclonedds
namespace org::eclipse::cyclonedds::core

Typedefs

typedef ScopedLock<Mutex> ScopedMutexLock
typedef ScopedLock<ObjectDelegate> ScopedObjectLock

Functions

void convertByteSeq(const dds::core::ByteSeq &from, void *&to, int32_t size)
void convertByteSeq(const void *from, const int32_t size, dds::core::ByteSeq &to)
void convertStringSeq(const dds::core::StringSeq &from, char **&to)
void convertStringSeq(char **from, uint32_t size, dds::core::StringSeq &to)
dds::core::Duration convertDuration(const dds_duration_t &from)
dds_duration_t convertDuration(const dds::core::Duration &from)
dds::core::Time convertTime(const dds_time_t &from)
dds_time_t convertTime(const dds::core::Time &from)
dds::core::status::StatusMask convertStatusMask(const uint32_t from)
uint32_t convertStatusMask(const dds::core::status::StatusMask &from)

Variables

static Mutex gpb_mutex
namespace org::eclipse::cyclonedds::core::cdr

Enums

enum endianness

Endianness types.

C++ implementation of cyclonedds’s DDSRT_ENDIAN endianness defines

Values:

enumerator little_endian
enumerator big_endian
enum serialization_status

Serialization status bitmasks.

Describes the serialization status of a cdr stream.

These are stored as an bitfields in an int in cdr streams, since more than one serialization fault can be encountered.

Values:

enumerator move_bound_exceeded
enumerator write_bound_exceeded
enumerator read_bound_exceeded
enumerator illegal_field_value

Functions

template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void read(basic_cdr_stream &str, T &toread)

Primitive type stream manipulation functions.

Enumerated type stream manipulation functions. Since enumerated types are represented by a uint32_t in basic CDR streams they just loop through to writing uint32_t versions of the enum.

These are “endpoints” for write functions, since composit (sequence/array/constructed type) functions will decay to these calls.

Primitive type read function.

Aligns the stream to the alignment of type T. Reads the value from the current position of the stream str into toread. Moves the cursor of the stream by the size of T. This function is only enabled for arithmetic types and enums.

These are “endpoints” for write functions, since compound (sequence/array/constructed type) functions will decay to these calls.

Reads the value of the enum from the stream.

Parameters
  • str[inout] The stream which is read from.

  • toread[out] The variable to read into.

  • str[inout] The stream which is read from.

  • toread[out] The variable to read into.

template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void read_swapped(basic_cdr_stream &str, T &toread)

Primitive type read function, byteswap version.

Reads the byteswapped value of the enum from the stream.

Same as read(), with an additional byteswap at the end.

Parameters
  • str[inout] The stream which is read from.

  • toread[out] The variable to read into.

  • str[inout] The stream which is read from.

  • toread[out] The variable to read into.

template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void read_many(basic_cdr_stream &str, T *out, size_t N)
template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void read_many_swapped(basic_cdr_stream &str, T *out, size_t N)
template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void write(basic_cdr_stream &str, const T &towrite)

Primitive type write function.

Writes the value of the enum to the stream.

Aligns str to the type to be written. Writes towrite to str. Swaps bytes written to str if the endiannesses do not match up. Moves the cursor of str by the size of towrite. This function is only enabled for arithmetic types.

Parameters
  • str[inout] The stream which is written to.

  • towrite[in] The variable to write.

  • str[inout] The stream which is written to.

  • towrite[in] The variable to write.

template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void write_swapped(basic_cdr_stream &str, const T &towrite)

Primitive type write function, byteswap version.

Writes the byteswapped value of the enum to the stream.

Same as write(), with an additional byteswap at the end.

Parameters
  • str[inout] The stream which is read from.

  • towrite[in] The variable to write.

  • str[inout] The stream which is written to.

  • towrite[in] The variable to write.

template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void write_many(basic_cdr_stream &str, const T *in, size_t N)
template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void write_many_swapped(basic_cdr_stream &str, const T *in, size_t N)
template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void move(basic_cdr_stream &str, const T &toincr)

Primitive type cursor move function.

Moves the cursor of the stream by the size the enum would take up.

Used in determining the size of a type when written to the stream. Aligns str to the size of toincr. Moves the cursor of str by the size of toincr. This function is only enabled for arithmetic types.

Parameters
  • str[inout] The stream whose cursor is moved.

  • toincr[in] The variable to move the cursor by, no contents of this variable are used, it is just used to determine the template.

  • str[inout] The stream whose cursor is moved.

  • toincr[in] The variable to move the cursor by, no contents of this variable are used, it is just used to determine the template.

template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void move_swapped(basic_cdr_stream &str, const T &toincr)

Primitive type cursor move function, byteswap version.

Moves the cursor of the stream by the size the enum would take up (byteswapped version).

Same as move(), with an additional byteswap at the end.

Parameters
  • str[inout] The stream whose cursor is moved.

  • toincr[in] The variable to move the cursor by, no contents of this variable are used, it is just used to determine the template.

  • str[inout] The stream whose cursor is moved.

  • toincr[in] The variable to move the cursor by, no contents of this variable are used, it is just used to determine the template.

template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void move_many(basic_cdr_stream &str, const T *toincr, size_t N)
template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void move_many_swapped(basic_cdr_stream &str, const T *toincr, size_t N)
template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void max(basic_cdr_stream &str, const T &max_sz)

Primitive type max stream move function.

Moves the cursor of the stream by the size the enum would take up (maximum size version).

Used in determining the maximum stream size of a constructed type. Moves the cursor to the maximum position it could occupy after writing max_sz to the stream. Is in essence the same as the primitive type cursor move function, but additionally checks for whether the cursor it at the “end”, which may happen if unbounded members (strings/sequences/…) are part of the constructed type. This function is only enabled for arithmetic types.

Parameters
  • str[inout] The stream whose cursor is moved.

  • max_sz[in] The variable to move the cursor by, no contents of this variable are used, it is just used to determine the template.

  • str[inout] The stream whose cursor is moved.

  • max_sz[in] The variable to move the cursor by, no contents of this variable are used, it is just used to determine the template.

template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void max_swapped(basic_cdr_stream &str, const T &max_sz)

Primitive type max stream move function.

Moves the cursor of the stream by the size the enum would take up (maximum size and byteswapped version).

Same as max(), with an additional byteswap at the end.

Parameters
  • str[inout] The stream whose cursor is moved.

  • max_sz[in] The variable to move the cursor by, no contents of this variable are used, it is just used to determine the template.

  • str[inout] The stream whose cursor is moved.

  • max_sz[in] The variable to move the cursor by, no contents of this variable are used, it is just used to determine the template.

template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void max_many(basic_cdr_stream &str, const T *max_sz, size_t N)
template<typename T, std::enable_if_t<std::is_arithmetic<T>::value && !std::is_enum<T>::value, bool> = true>
inline void max_many_swapped(basic_cdr_stream &str, const T *max_sz, size_t N)
template<typename T>
void read_string(basic_cdr_stream &str, T &toread, size_t N)

String type stream manipulation functions.

These are “endpoints” for write functions, since compound (sequence/array/constructed type) functions will decay to these calls.

Bounded string read function.

Reads the length from str, but then initializes toread with at most N characters from it. It does move the cursor by length read, since that is the number of characters in the stream. If N is 0, then the string is taken to be unbounded.

Parameters
  • str[inout] The stream to read from.

  • toread[out] The string to read to.

  • N[in] The maximum number of characters to read from the stream.

template<typename T>
void read_string_swapped(basic_cdr_stream &str, T &toread, size_t N)

Bounded string read function, byteswapped version.

Same as read_string(), only that the string length is byte swapped.

Parameters
  • str[inout] The stream to read from.

  • toread[out] The string to read to.

  • N[in] The maximum number of characters to read from the stream.

template<typename T>
void write_string(basic_cdr_stream &str, const T &towrite, size_t N)

Bounded string write function.

Attempts to write the length of towrite to str, where the bound is checked. Then writes the contents of towrite to str. If N is 0, then the string is taken to be unbounded.

Parameters
  • str[inout] The stream to write to.

  • towrite[in] The string to write.

  • N[in] The maximum number of characters to write to the stream.

template<typename T>
void write_string_swapped(basic_cdr_stream &str, const T &towrite, size_t N)

Bounded string write function, byteswapped version.

Same as write_string(), only that the string length is byte swapped.

Parameters
  • str[inout] The stream to write to.

  • towrite[in] The string to write.

  • N[in] The maximum number of characters to write to the stream.

template<typename T>
void move_string(basic_cdr_stream &str, const T &toincr, size_t N)

Bounded string cursor move function.

Attempts to move the cursor for the length field, where the bound is checked. Then moves the cursor for the length of the string. If N is 0, then the string is taken to be unbounded.

Parameters
  • str[inout] The stream whose cursor is moved.

  • toincr[in] The string used to move the cursor.

  • N[in] The maximum number of characters in the string which the stream is moved by.

template<typename T>
inline void move_string_swapped(basic_cdr_stream &str, const T &toincr, size_t N)

Bounded string cursor move function, byteswapped version.

Same as move_string().

Parameters
  • str[inout] The stream whose cursor is moved.

  • toincr[in] The string used to move the cursor.

  • N[in] The maximum number of characters in the string which the stream is moved by.

template<typename T>
void max_string(basic_cdr_stream &str, const T &max_sz, size_t N)

Bounded string cursor max move function.

Similar to the string move function, with the additional checks that no move is done if the cursor is already at its maximum position, and that the cursor is set to its maximum position if the bound is equal to 0 (unbounded).

Parameters
  • str[inout] The stream whose cursor is moved.

  • max_sz[in] The string used to move the cursor.

  • N[in] The maximum number of characters in the string which the stream is moved by.

template<typename T>
inline void max_string_swapped(basic_cdr_stream &str, const T &max_sz, size_t N)

Bounded string cursor max move function, byteswapped version.

Same as max_string().

Parameters
  • str[inout] The stream whose cursor is moved.

  • max_sz[in] The string used to move the cursor.

  • N[in] The maximum number of characters in the string which the stream is moved by.

template<typename T, typename = std::enable_if_t<std::is_arithmetic<T>::value>>
void byte_swap(T &toswap)

Byte swapping function, is only enabled for arithmetic (base) types.

Determines the number of bytes to swap by the size of the template parameter.

Parameters

toswap[inout] The entity whose bytes will be swapped.

constexpr endianness native_endianness()

Returns the endianness of the local system.

Takes the value from the DDSRT_ENDIAN definition and converts it to the c++ enum class value.

Returns

  • little_endian – If the system is little endian.

  • big_endian – If the system is big endian.

inline bool swap_necessary(endianness remote)

Returns whether a byte swap is necessary for an incoming data set.

Parameters

remote[in] The remote (incoming) data endianness.

Returns

Whether the local and remote datasets have the same endianness.

namespace cond
namespace policy
namespace org::eclipse::cyclonedds::core::timehelper

Functions

template<typename TIMEISH>
bool is_valid_for_arithmetic(const TIMEISH &t)

Check if the TIMEISH value supplied is at all suitable for arithmetic jiggery pokery. Invalidity encompasses (but is not restricted to) a -1 seconds part an ‘infinity’ Duration, an ‘invalid’ Time (or Duration).

Parameters

t – the TIMEISH thing to check

Returns

true if the argument is not suitable for doing sums with.

template<typename TIMEISH>
void validate(const TIMEISH &t, const char *context = "timehelper", const char *function = "validate")

Check a TIMEISH is valid for doing sums with.

See

OSPL_CONTEXT_LITERAL

See

is_valid_for_arithmetic

Parameters
  • t – the TIMEISH thing to check

  • context – Some sort of clue to the receiver about what was called or what you were trying to do. Must be a literal or c_str. Defaults to “”.

  • function – String to be concateneated onto context. Must be a literal or c_str. Defaults to “”.

Throws

adds::core::InvalidDataError if not valid.

namespace org::eclipse::cyclonedds::core::utils

Functions

void report(int32_t code, int32_t reportType, const char *file, int32_t line, const char *signature, const char *format, ...)
void throw_exception(int32_t code, const char *file, int32_t line, const char *signature, const char *format, ...)
void check_ddsc_result_and_throw_exception(dds_return_t code, const char *file, int32_t line, const char *signature, const char *format, ...)

Variables

const int32_t error_code = 1
const int32_t unsupported_error_code = 2
const int32_t invalid_argument_code = 3
const int32_t precondition_not_met_error_code = 4
const int32_t out_of_resources_error_code = 5
const int32_t not_enabled_error_code = 6
const int32_t immutable_policy_error_code = 7
const int32_t inconsistent_policy_error_code = 8
const int32_t already_closed_error_code = 9
const int32_t timeout_error_code = 10
const int32_t no_data_error_code = 11
const int32_t illegal_operation_error_code = 12
const int32_t null_reference_error_code = 13
namespace org::eclipse::cyclonedds::domain

Functions

uint32_t any_id()
uint32_t default_id()
namespace org::eclipse::cyclonedds::domain::qos

Functions

template<>
inline const dds::core::policy::UserData &policy<dds::core::policy::UserData>() const
template<>
inline const dds::core::policy::EntityFactory &policy<dds::core::policy::EntityFactory>() const
namespace pub
namespace org::eclipse::cyclonedds::pub::qos

Functions

template<>
inline const dds::core::policy::UserData &policy<dds::core::policy::UserData>() const
template<>
inline const dds::core::policy::Durability &policy<dds::core::policy::Durability>() const
template<>
inline const dds::core::policy::Deadline &policy<dds::core::policy::Deadline>() const
template<>
inline const dds::core::policy::LatencyBudget &policy<dds::core::policy::LatencyBudget>() const
template<>
inline const dds::core::policy::Liveliness &policy<dds::core::policy::Liveliness>() const
template<>
inline const dds::core::policy::Reliability &policy<dds::core::policy::Reliability>() const
template<>
inline const dds::core::policy::DestinationOrder &policy<dds::core::policy::DestinationOrder>() const
template<>
inline const dds::core::policy::History &policy<dds::core::policy::History>() const
template<>
inline const dds::core::policy::ResourceLimits &policy<dds::core::policy::ResourceLimits>() const
template<>
inline const dds::core::policy::TransportPriority &policy<dds::core::policy::TransportPriority>() const
template<>
inline const dds::core::policy::Lifespan &policy<dds::core::policy::Lifespan>() const
template<>
inline const dds::core::policy::Ownership &policy<dds::core::policy::Ownership>() const
template<>
inline const dds::core::policy::WriterDataLifecycle &policy<dds::core::policy::WriterDataLifecycle>() const
template<>
inline const dds::core::policy::Presentation &policy<dds::core::policy::Presentation>() const
template<>
inline const dds::core::policy::Partition &policy<dds::core::policy::Partition>() const
template<>
inline const dds::core::policy::GroupData &policy<dds::core::policy::GroupData>() const
template<>
inline const dds::core::policy::EntityFactory &policy<dds::core::policy::EntityFactory>() const
namespace sub
namespace cond
namespace org::eclipse::cyclonedds::sub::qos

Functions

template<>
inline const dds::core::policy::Durability &policy<dds::core::policy::Durability>() const
template<>
inline const dds::core::policy::UserData &policy<dds::core::policy::UserData>() const
template<>
inline const dds::core::policy::Deadline &policy<dds::core::policy::Deadline>() const
template<>
inline const dds::core::policy::LatencyBudget &policy<dds::core::policy::LatencyBudget>() const
template<>
inline const dds::core::policy::Liveliness &policy<dds::core::policy::Liveliness>() const
template<>
inline const dds::core::policy::Reliability &policy<dds::core::policy::Reliability>() const
template<>
inline const dds::core::policy::DestinationOrder &policy<dds::core::policy::DestinationOrder>() const
template<>
inline const dds::core::policy::History &policy<dds::core::policy::History>() const
template<>
inline const dds::core::policy::ResourceLimits &policy<dds::core::policy::ResourceLimits>() const
template<>
inline const dds::core::policy::Ownership &policy<dds::core::policy::Ownership>() const
template<>
inline const dds::core::policy::TimeBasedFilter &policy<dds::core::policy::TimeBasedFilter>() const
template<>
inline const dds::core::policy::ReaderDataLifecycle &policy<dds::core::policy::ReaderDataLifecycle>() const
template<>
inline const dds::core::policy::Presentation &policy<dds::core::policy::Presentation>() const
template<>
inline const dds::core::policy::Partition &policy<dds::core::policy::Partition>() const
template<>
inline const dds::core::policy::GroupData &policy<dds::core::policy::GroupData>() const
template<>
inline const dds::core::policy::EntityFactory &policy<dds::core::policy::EntityFactory>() const
namespace org::eclipse::cyclonedds::topic

Typedefs

typedef int16_t DataRepresentationId_t

Enums

enum BlobKind

Values:

enumerator Empty
enumerator KeyOnly
enumerator Data

Functions

dds::topic::TopicDescription find_topic_description(const dds::domain::DomainParticipant &dp, const std::string &topic_name)
dds::topic::AnyTopic find_any_topic(const dds::domain::DomainParticipant &dp, const std::string &topic_name)
bool simple_key(const std::vector<unsigned char> &in, ddsi_keyhash_t &out)
bool complex_key(const std::vector<unsigned char> &in, ddsi_keyhash_t &out)

Variables

const DataRepresentationId_t XCDR_REPRESENTATION = 0
const DataRepresentationId_t XML_REPRESENTATION = 0x001
const DataRepresentationId_t OSPL_REPRESENTATION = 0x400
const DataRepresentationId_t GPB_REPRESENTATION = 0x401
const DataRepresentationId_t INVALID_REPRESENTATION = 0x7FFF
namespace org::eclipse::cyclonedds::topic::qos

Functions

template<>
inline const dds::core::policy::TopicData &policy<dds::core::policy::TopicData>() const
template<>
inline const dds::core::policy::Durability &policy<dds::core::policy::Durability>() const
template<>
inline const dds::core::policy::Deadline &policy<dds::core::policy::Deadline>() const
template<>
inline const dds::core::policy::LatencyBudget &policy<dds::core::policy::LatencyBudget>() const
template<>
inline const dds::core::policy::Liveliness &policy<dds::core::policy::Liveliness>() const
template<>
inline const dds::core::policy::Reliability &policy<dds::core::policy::Reliability>() const
template<>
inline const dds::core::policy::DestinationOrder &policy<dds::core::policy::DestinationOrder>() const
template<>
inline const dds::core::policy::History &policy<dds::core::policy::History>() const
template<>
inline const dds::core::policy::ResourceLimits &policy<dds::core::policy::ResourceLimits>() const
template<>
inline const dds::core::policy::TransportPriority &policy<dds::core::policy::TransportPriority>() const
template<>
inline const dds::core::policy::Lifespan &policy<dds::core::policy::Lifespan>() const
template<>
inline const dds::core::policy::Ownership &policy<dds::core::policy::Ownership>() const
file array.hpp
#include <dds/core/detail/array.hpp>
file array.hpp
#include <array>
file BuiltinTopicTypes.hpp
file BuiltinTopicTypes.hpp
file Condition.hpp
#include <dds/core/Reference.hpp>#include <dds/core/cond/detail/GuardCondition.hpp>#include <dds/core/cond/detail/StatusCondition.hpp>#include <dds/sub/cond/detail/ReadCondition.hpp>#include <dds/sub/cond/detail/QueryCondition.hpp>
file Condition.hpp
#include <dds/core/cond/detail/ConditionImpl.hpp>#include <org/eclipse/cyclonedds/core/cond/ConditionDelegate.hpp>
file ConditionImpl.hpp
#include <dds/core/detail/ReferenceImpl.hpp>#include <dds/core/cond/Condition.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file GuardConditionImpl.hpp
#include <dds/core/cond/GuardCondition.hpp>#include <org/eclipse/cyclonedds/core/cond/GuardConditionDelegate.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file StatusConditionImpl.hpp
#include <dds/core/cond/StatusCondition.hpp>#include <org/eclipse/cyclonedds/core/cond/StatusConditionDelegate.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file WaitSetImpl.hpp
#include <dds/core/cond/WaitSet.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file GuardCondition.hpp
#include <dds/core/cond/Condition.hpp>
file GuardCondition.hpp
file StatusCondition.hpp
#include <dds/core/status/State.hpp>#include <dds/core/cond/Condition.hpp>#include <dds/core/cond/detail/StatusCondition.hpp>#include <dds/core/Entity.hpp>
file StatusCondition.hpp
file WaitSet.hpp
#include <vector>#include <dds/core/types.hpp>#include <dds/core/Duration.hpp>#include <dds/core/cond/Condition.hpp>
file WaitSet.hpp
#include <dds/core/cond/detail/WaitSetImpl.hpp>#include <org/eclipse/cyclonedds/core/cond/WaitSetDelegate.hpp>
file conformance.hpp
#include <dds/core/detail/conformance.hpp>
file conformance.hpp

Defines

OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
OMG_DDS_PERSISTENCE_SUPPORT
OMG_DDS_OWNERSHIP_SUPPORT
OMG_DDS_OBJECT_MODEL_SUPPORT
OMG_DDS_HAS_PRETTY_PRINT_COUT
file ddscore.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/core/types.hpp>#include <dds/core/Time.hpp>#include <dds/core/Duration.hpp>#include <dds/core/InstanceHandle.hpp>#include <dds/core/array.hpp>#include <dds/core/Entity.hpp>#include <dds/core/cond/GuardCondition.hpp>#include <dds/core/cond/StatusCondition.hpp>#include <dds/core/cond/WaitSet.hpp>#include <dds/core/detail/ddscore.hpp>
file ddscore.hpp
file EntityImpl.hpp
#include <dds/core/detail/ReferenceImpl.hpp>#include <dds/core/Entity.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file EntityQosImpl.hpp
#include <dds/core/EntityQos.hpp>
file InstanceHandleImpl.hpp
#include <dds/core/detail/Value.hpp>#include <org/eclipse/cyclonedds/core/InstanceHandleDelegate.hpp>#include <dds/core/InstanceHandle.hpp>

Functions

inline std::ostream &operator<<(std::ostream &os, const dds::core::InstanceHandle<org::eclipse::cyclonedds::core::InstanceHandleDelegate> &h)
file inttypes.hpp
#include <stdint.h>
file macros.hpp
#include <iostream>#include <string.h>#include “dds/core/detail/export.hpp”#include <cstring>

Defines

OMG_DDS_DEFAULT_STATE_BIT_COUNT_DETAIL
OMG_DDS_DEFAULT_STATUS_COUNT_DETAIL
OSPL_DEFAULT_TO_CXX11
OSPL_USE_CXX11
OMG_DDS_STATIC_ASSERT_DETAIL(condition)
OSPL_DDS_CXX11
OSPL_DDS_FINAL
OSPL_ENUM
OSPL_ENUM_LABEL(_escope, _etype, _elabel)
DDSCXX_UNUSED_ARG(a)

Macro to disable unused argument warnings.

DDSCXX_WARNING_MSVC_OFF(x)

Macro to disable specific compiler warnings.

DDSCXX_WARNING_MSVC_ON(x)
file macros.hpp
#include <dds/core/detail/macros.hpp>

Defines

OMG_DDS_STATIC_ASSERT
OMG_DDS_LOG(kind, msg)
OMG_DDS_DEFAULT_STATE_BIT_COUNT
OMG_DDS_DEFAULT_STATUS_COUNT
OMG_DDS_STATE_BIT_COUNT
OMG_DDS_STATUS_COUNT
OMG_DDS_API
TEMP_TYPE
OMG_DDS_COMPLETE_RULE_OF_FIVE_VIRTUAL_DEFAULT(TYPE)
OMG_DDS_COMPLETE_RULE_OF_FIVE_VIRTUAL_EXPLICIT(TYPE)
file module_docs.hpp

This file exists only to be fed to doxygen. There is quite literally nothing else to see here.

file QosProviderImpl.hpp
#include <dds/core/QosProvider.hpp>
file ref_traits.hpp
#include <memory>#include <type_traits>#include <dds/core/types.hpp>#include <dds/core/Exception.hpp>
file ref_traits.hpp
#include <dds/core/detail/ref_traits.hpp>
file ReferenceImpl.hpp
#include <dds/core/Reference.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>

Functions

template<class D>
bool operator==(dds::core::null_type, const dds::core::Reference &r)

Special operator== used to check if this reference object does not equal the dds::core::null reference.

The non-null-check can be done like this:

if (dds::core::null == r) {
   // Do not use the dds reference object r in its current state
}

Returns

true if this reference is not null.

template<class D>
bool operator!=(dds::core::null_type, const dds::core::Reference &r)

Special operator!= used to check if this reference object does not equal the dds::core::null reference.

The non-null-check can be done like this:

if (dds::core::null != r) {
   // Use the dds reference object r
}

Returns

true if this reference is not null.

file WeakReferenceImpl.hpp
#include <dds/core/detail/ReferenceImpl.hpp>#include <dds/core/WeakReference.hpp>
file Duration.hpp
#include <dds/core/types.hpp>

This class represents a time interval.

file Entity.hpp
#include <string>#include <dds/core/Reference.hpp>#include <dds/core/status/Status.hpp>
file Entity.hpp
#include <dds/core/detail/EntityImpl.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>
file EntityQos.hpp
#include <dds/core/Value.hpp>
file Exception.hpp
#include <stdexcept>#include <string>#include <dds/core/macros.hpp>
file InstanceHandle.hpp
#include <dds/core/types.hpp>#include <dds/core/Value.hpp>
file InstanceHandle.hpp
#include <dds/core/detail/InstanceHandleImpl.hpp>#include <org/eclipse/cyclonedds/core/InstanceHandleDelegate.hpp>
file LengthUnlimited.hpp
file Optional.hpp
file CorePolicy.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/core/LengthUnlimited.hpp>#include <dds/core/detail/Value.hpp>#include <dds/core/policy/PolicyKind.hpp>
file CorePolicy.hpp
#include <org/eclipse/cyclonedds/core/policy/PolicyDelegate.hpp>#include <dds/core/policy/detail/CorePolicyImpl.hpp>#include <org/eclipse/cyclonedds/core/policy/Policy.hpp>
file CorePolicyImpl.hpp
#include <dds/core/policy/CorePolicy.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file QosPolicyCountImpl.hpp
#include <dds/core/policy/QosPolicyCount.hpp>
file PolicyKind.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/core/SafeEnumeration.hpp>
file QosPolicyCount.hpp
#include <dds/core/Value.hpp>
file QosPolicyCount.hpp
#include <dds/core/policy/detail/QosPolicyCountImpl.hpp>#include <org/eclipse/cyclonedds/core/policy/QosPolicyCountDelegate.hpp>
file QosProvider.hpp
#include <dds/core/Reference.hpp>#include <dds/domain/qos/DomainParticipantQos.hpp>#include <dds/topic/qos/TopicQos.hpp>#include <dds/sub/qos/SubscriberQos.hpp>#include <dds/sub/qos/DataReaderQos.hpp>#include <dds/pub/qos/PublisherQos.hpp>#include <dds/pub/qos/DataWriterQos.hpp>
file QosProvider.hpp
#include <dds/core/detail/QosProviderImpl.hpp>#include <org/eclipse/cyclonedds/core/QosProviderDelegate.hpp>
file Reference.hpp
#include <dds/core/types.hpp>#include <dds/core/refmacros.hpp>#include <dds/core/Exception.hpp>

Functions

template<class D>
bool operator==(dds::core::null_type, const dds::core::Reference &r)

Special operator== used to check if this reference object does not equal the dds::core::null reference.

The non-null-check can be done like this:

if (dds::core::null == r) {
   // Do not use the dds reference object r in its current state
}

Returns

true if this reference is not null.

template<class D>
bool operator!=(dds::core::null_type, const dds::core::Reference &r)

Special operator!= used to check if this reference object does not equal the dds::core::null reference.

The non-null-check can be done like this:

if (dds::core::null != r) {
   // Use the dds reference object r
}

Returns

true if this reference is not null.

file refmacros.hpp
#include <dds/core/macros.hpp>#include <dds/core/ref_traits.hpp>

Defines

DECLARE_TYPE_TRAITS(TYPE)
OMG_DDS_REF_TYPE_BASE(TYPE, BASE)
OMG_DDS_IMPLICIT_REF_BASE(TYPE)
OMG_DDS_EXPLICIT_REF_BASE_DECL(TYPE, FROM)
OMG_DDS_EXPLICIT_REF_BASE(TYPE, FROM)
OMG_DDS_REF_TYPE_PROTECTED_DC(TYPE, BASE)
OMG_DDS_REF_TYPE_PROTECTED_DC_T(TYPE, BASE, T_PARAM)
OMG_DDS_REF_TYPE_NO_DC(TYPE, BASE)
OMG_DDS_REF_TYPE_DELEGATE_C(TYPE, BASE)
file SafeEnumeration.hpp
file StatusImpl.hpp
#include <dds/core/status/Status.hpp>
file State.hpp
#include <bitset>#include <dds/core/macros.hpp>#include <dds/core/types.hpp>
file Status.hpp
#include <dds/core/Value.hpp>#include <dds/core/InstanceHandle.hpp>#include <dds/core/policy/CorePolicy.hpp>#include <dds/core/policy/QosPolicyCount.hpp>#include <dds/core/status/State.hpp>
file Status.hpp
#include <dds/core/status/detail/StatusImpl.hpp>#include <org/eclipse/cyclonedds/core/status/StatusDelegate.hpp>
file Time.hpp
#include <dds/core/types.hpp>

Functions

const dds::core::Time operator+(const dds::core::Time &lhs, const dds::core::Duration &rhs)

Add a Duration to a Time value

Parameters
  • lhs – Time

  • rhs – Duration

Returns

Time * Duration

const dds::core::Time operator+(const dds::core::Duration &lhs, const dds::core::Time &rhs)

Add a Duration to a Time value

Parameters
  • lhs – Duration

  • rhs – Time

Returns

Duration + Time

const dds::core::Time operator-(const dds::core::Time &lhs, const dds::core::Duration &rhs)

Subtract a Duration from a Time value

Parameters
  • lhs – Time

  • rhs – Duration

Returns

Time - Duration

file types.hpp
#include <string>#include <vector>#include <dds/core/detail/inttypes.hpp>#include <dds/core/macros.hpp>#include <dds/core/detail/conformance.hpp>
file Value.hpp
file Value.hpp
#include <dds/core/Value.hpp>
file WeakReference.hpp
#include <dds/core/Reference.hpp>
file Annotation.hpp
#include <dds/core/Reference.hpp>
file Annotation.hpp
file Annotations.hpp
#include <dds/core/xtypes/Annotation.hpp>#include <dds/core/xtypes/detail/Annotation.hpp>
file CollectionTypes.hpp
#include <dds/core/xtypes/DynamicType.hpp>
file CollectionTypes.hpp
file DynamicData.hpp
#include <dds/core/Reference.hpp>#include <dds/core/xtypes/DynamicType.hpp>#include <dds/core/xtypes/MemberType.hpp>
file DynamicData.hpp
file DynamicType.hpp
#include <string>#include <vector>#include <dds/core/conformance.hpp>#include <dds/core/Reference.hpp>#include <dds/core/xtypes/Annotations.hpp>
file DynamicType.hpp
file MemberType.hpp
file MemberType.hpp
file PrimitiveTypes.hpp
#include <dds/core/xtypes/DynamicType.hpp>#include <dds/core/xtypes/TypeKind.hpp>#include <dds/core/xtypes/detail/PrimitiveTypes.hpp>
file PrimitiveTypes.hpp
#include <dds/core/xtypes/TypeKind.hpp>
file StructType.hpp
#include <dds/core/xtypes/DynamicType.hpp>#include <dds/core/xtypes/MemberType.hpp>#include <dds/core/xtypes/PrimitiveTypes.hpp>
file StructType.hpp
file TypeKind.hpp
#include <bitset>#include <dds/core/SafeEnumeration.hpp>#include <dds/core/detail/conformance.hpp>

Defines

OMG_DDS_TYPE_OBJECT_HPP_
file TypeProvider.hpp
#include <dds/core/xtypes/DynamicType.hpp>
file TypeProvider.hpp
file UnionCase.hpp
#include <dds/core/Reference.hpp>#include <dds/core/xtypes/MemberType.hpp>#include <dds/core/xtypes/detail/UnionCase.hpp>
file UnionCase.hpp
file UnionType.hpp
#include <dds/core/xtypes/DynamicType.hpp>#include <dds/core/xtypes/UnionCase.hpp>#include <dds/core/xtypes/PrimitiveTypes.hpp>#include <dds/core/xtypes/detail/UnionType.hpp>#include <vector>
file UnionType.hpp
file dds.hpp
#include <dds/core/ddscore.hpp>#include <dds/domain/ddsdomain.hpp>#include <dds/topic/ddstopic.hpp>#include <dds/sub/ddssub.hpp>#include <dds/pub/ddspub.hpp>#include <dds/core/QosProvider.hpp>

This utility header includes the headers of all the DDS DCPS modules.

file ddsdomain.hpp
#include <dds/domain/find.hpp>#include <dds/domain/discovery.hpp>#include <dds/domain/DomainParticipant.hpp>#include <dds/domain/detail/ddsdomain.hpp>
file ddsdomain.hpp
file DomainParticipantImpl.hpp
#include <dds/domain/DomainParticipant.hpp>#include <org/eclipse/cyclonedds/domain/DomainParticipantDelegate.hpp>#include <org/eclipse/cyclonedds/domain/DomainParticipantRegistry.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file discovery.hpp
#include <dds/core/InstanceHandle.hpp>#include <dds/domain/DomainParticipant.hpp>
file discovery.hpp
#include <dds/pub/DataWriter.hpp>
file discovery.hpp
#include <dds/domain/DomainParticipant.hpp>#include <dds/pub/DataWriter.hpp>#include <dds/topic/BuiltinTopic.hpp>#include <dds/pub/detail/discovery.hpp>
file discovery.hpp
#include <dds/sub/DataReader.hpp>
file discovery.hpp
#include <dds/domain/DomainParticipant.hpp>#include <dds/sub/DataReader.hpp>#include <dds/topic/BuiltinTopic.hpp>#include <dds/sub/detail/discovery.hpp>
file discovery.hpp
#include <dds/topic/AnyTopic.hpp>#include <dds/topic/Topic.hpp>#include <org/eclipse/cyclonedds/topic/discovery.hpp>#include <string>
file discovery.hpp
#include <dds/domain/DomainParticipant.hpp>#include <dds/topic/detail/discovery.hpp>
file discovery.hpp
#include <dds/domain/DomainParticipant.hpp>#include <dds/topic/TopicDescription.hpp>#include <dds/topic/AnyTopic.hpp>#include <dds/topic/Topic.hpp>#include <dds/topic/ContentFilteredTopic.hpp>
file DomainParticipant.hpp
#include <string>#include <dds/ddsi/ddsi_config.h>#include <dds/core/detail/conformance.hpp>#include <dds/core/types.hpp>#include <dds/core/Time.hpp>#include <dds/core/Entity.hpp>#include <dds/domain/qos/DomainParticipantQos.hpp>#include <dds/topic/qos/TopicQos.hpp>#include <dds/pub/qos/PublisherQos.hpp>#include <dds/sub/qos/SubscriberQos.hpp>
file DomainParticipant.hpp
#include <dds/domain/detail/DomainParticipantImpl.hpp>
file DomainParticipantListener.hpp
#include <dds/pub/PublisherListener.hpp>#include <dds/sub/SubscriberListener.hpp>#include <dds/topic/AnyTopicListener.hpp>
file DomainParticipantListener.hpp
#include <dds/domain/DomainParticipantListener.hpp>#include <org/eclipse/cyclonedds/topic/AnyTopicListener.hpp>
file find.hpp
#include <dds/domain/DomainParticipant.hpp>
file find.hpp
#include <string>#include <dds/pub/DataWriter.hpp>#include <dds/pub/Publisher.hpp>#include <org/eclipse/cyclonedds/pub/PublisherDelegate.hpp>#include <org/eclipse/cyclonedds/pub/AnyDataWriterDelegate.hpp>
file find.hpp
#include <string>#include <dds/pub/detail/find.hpp>
file find.hpp
#include <string>#include <vector>#include <dds/sub/DataReader.hpp>#include <dds/sub/Subscriber.hpp>#include <dds/sub/status/DataState.hpp>#include <dds/topic/TopicDescription.hpp>#include <org/eclipse/cyclonedds/sub/SubscriberDelegate.hpp>#include <org/eclipse/cyclonedds/sub/BuiltinSubscriberDelegate.hpp>#include <org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp>
file find.hpp
#include <string>#include <dds/sub/detail/find.hpp>
file find.hpp
#include <org/eclipse/cyclonedds/topic/find.hpp>#include <string>
file find.hpp
#include <string>#include <dds/topic/detail/find.hpp>
file find.hpp
#include <dds/domain/DomainParticipant.hpp>#include <dds/topic/TopicDescription.hpp>#include <dds/topic/AnyTopic.hpp>#include <dds/topic/Topic.hpp>#include <dds/topic/ContentFilteredTopic.hpp>
file DomainParticipantQos.hpp
#include <dds/core/detail/EntityQosImpl.hpp>#include <org/eclipse/cyclonedds/domain/qos/DomainParticipantQosDelegate.hpp>
file AnyDataWriter.hpp
#include <dds/core/Entity.hpp>#include <dds/pub/Publisher.hpp>#include <dds/pub/qos/DataWriterQos.hpp>#include <dds/topic/TopicDescription.hpp>
file AnyDataWriter.hpp
#include <dds/pub/detail/AnyDataWriterImpl.hpp>#include <org/eclipse/cyclonedds/pub/AnyDataWriterDelegate.hpp>
file AnyDataWriterListener.hpp
#include <dds/pub/AnyDataWriter.hpp>
file CoherentSet.hpp
#include <dds/pub/Publisher.hpp>
file CoherentSet.hpp
#include <dds/pub/detail/CoherentSetImpl.hpp>#include <org/eclipse/cyclonedds/pub/CoherentSetDelegate.hpp>
file DataWriter.hpp
#include <dds/core/InstanceHandle.hpp>#include <dds/topic/Topic.hpp>#include <dds/topic/TopicInstance.hpp>#include <dds/pub/Publisher.hpp>#include <dds/pub/AnyDataWriter.hpp>#include <dds/pub/detail/DataWriter.hpp>
file DataWriter.hpp
#include <dds/topic/Topic.hpp>#include <dds/pub/AnyDataWriter.hpp>#include <dds/topic/detail/Topic.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>#include <org/eclipse/cyclonedds/topic/TopicTraits.hpp>#include <org/eclipse/cyclonedds/core/ScopedLock.hpp>#include <org/eclipse/cyclonedds/pub/AnyDataWriterDelegate.hpp>#include <dds/dds.h>
file DataWriterListener.hpp
#include <dds/pub/DataWriter.hpp>
file ddspub.hpp
#include <dds/pub/DataWriter.hpp>#include <dds/pub/AnyDataWriter.hpp>#include <dds/pub/find.hpp>#include <dds/pub/discovery.hpp>#include <dds/pub/SuspendedPublication.hpp>#include <dds/pub/CoherentSet.hpp>#include <dds/pub/detail/ddspub.hpp>
file ddspub.hpp
#include “dds/pub/detail/DataWriterImpl.hpp”
file AnyDataWriterImpl.hpp
#include <dds/pub/AnyDataWriter.hpp>
file CoherentSetImpl.hpp
#include <dds/pub/CoherentSet.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file DataWriterImpl.hpp
#include <dds/topic/Topic.hpp>#include <dds/pub/PublisherListener.hpp>#include <dds/domain/DomainParticipantListener.hpp>#include <org/eclipse/cyclonedds/core/ListenerDispatcher.hpp>#include <dds/pub/AnyDataWriter.hpp>#include <dds/pub/DataWriterListener.hpp>#include <org/eclipse/cyclonedds/pub/AnyDataWriterDelegate.hpp>
file PublisherImpl.hpp
#include <dds/pub/Publisher.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file SuspendedPublicationImpl.hpp
#include <dds/pub/SuspendedPublication.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
file Publisher.hpp
#include <dds/core/types.hpp>#include <dds/core/Entity.hpp>#include <dds/pub/qos/DataWriterQos.hpp>#include <dds/pub/qos/PublisherQos.hpp>#include <dds/domain/DomainParticipant.hpp>
file Publisher.hpp
#include <dds/pub/detail/PublisherImpl.hpp>#include <org/eclipse/cyclonedds/pub/PublisherDelegate.hpp>
file PublisherListener.hpp
#include <dds/pub/AnyDataWriterListener.hpp>
file DataWriterQos.hpp
#include <dds/core/detail/EntityQosImpl.hpp>#include <org/eclipse/cyclonedds/pub/qos/DataWriterQosDelegate.hpp>
file PublisherQos.hpp
#include <dds/core/detail/EntityQosImpl.hpp>#include <org/eclipse/cyclonedds/pub/qos/PublisherQosDelegate.hpp>
file SuspendedPublication.hpp
#include <dds/pub/Publisher.hpp>
file SuspendedPublication.hpp
#include <dds/pub/detail/SuspendedPublicationImpl.hpp>#include <org/eclipse/cyclonedds/pub/SuspendedPublicationDelegate.hpp>
file AnyDataReader.hpp
#include <dds/core/Entity.hpp>#include <dds/sub/Subscriber.hpp>#include <dds/sub/qos/DataReaderQos.hpp>#include <dds/topic/TopicDescription.hpp>#include <dds/core/macros.hpp>
file AnyDataReader.hpp
#include <dds/sub/detail/AnyDataReaderImpl.hpp>#include <org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp>
file AnyDataReaderListener.hpp
#include <dds/core/refmacros.hpp>#include <dds/core/status/Status.hpp>#include <dds/sub/AnyDataReader.hpp>
file CoherentAccess.hpp
#include <dds/core/Value.hpp>
file CoherentAccess.hpp
#include <dds/sub/detail/CoherentAccessImpl.hpp>#include <org/eclipse/cyclonedds/sub/CoherentAccessDelegate.hpp>
file QueryConditionImpl.hpp
#include <dds/sub/cond/QueryCondition.hpp>#include <org/eclipse/cyclonedds/sub/cond/QueryConditionDelegate.hpp>
file ReadConditionImpl.hpp
#include <dds/sub/cond/ReadCondition.hpp>#include <org/eclipse/cyclonedds/sub/cond/ReadConditionDelegate.hpp>
file QueryCondition.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/sub/cond/detail/QueryCondition.hpp>#include <dds/sub/cond/ReadCondition.hpp>
file QueryCondition.hpp
file ReadCondition.hpp
#include <dds/core/cond/Condition.hpp>#include <dds/sub/DataReader.hpp>#include <dds/sub/AnyDataReader.hpp>
file ReadCondition.hpp
file DataReader.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/sub/AnyDataReader.hpp>#include <dds/topic/ContentFilteredTopic.hpp>#include <dds/topic/TopicInstance.hpp>#include <dds/sub/LoanedSamples.hpp>#include <dds/sub/Subscriber.hpp>
file DataReader.hpp
#include <dds/topic/Topic.hpp>#include <dds/topic/TopicInstance.hpp>#include <dds/core/status/Status.hpp>#include <dds/sub/status/detail/DataStateImpl.hpp>#include <dds/sub/detail/Manipulators.hpp>#include <dds/sub/LoanedSamples.hpp>#include <dds/sub/Subscriber.hpp>#include <dds/sub/Query.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>#include <org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp>#include <org/eclipse/cyclonedds/core/ScopedLock.hpp>#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>#include <dds/dds.h>
file DataReaderListener.hpp
#include <dds/core/status/Status.hpp>
file ddssub.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/sub/DataReader.hpp>#include <dds/sub/status/DataState.hpp>#include <dds/sub/qos/DataReaderQos.hpp>#include <dds/sub/qos/SubscriberQos.hpp>#include <dds/sub/Rank.hpp>#include <dds/sub/GenerationCount.hpp>#include <dds/sub/AnyDataReaderListener.hpp>#include <dds/sub/SampleInfo.hpp>#include <dds/sub/LoanedSamples.hpp>#include <dds/sub/SharedSamples.hpp>#include <dds/sub/Subscriber.hpp>#include <dds/sub/CoherentAccess.hpp>#include <dds/sub/SubscriberListener.hpp>#include <dds/sub/DataReaderListener.hpp>#include <dds/sub/AnyDataReader.hpp>#include <dds/sub/cond/ReadCondition.hpp>#include <dds/sub/Query.hpp>#include <dds/sub/cond/QueryCondition.hpp>#include <dds/sub/find.hpp>#include <dds/sub/discovery.hpp>#include <dds/sub/detail/ddssub.hpp>

Functions

std::ostream &operator<<(std::ostream &os, const dds::sub::status::DataState &s)
std::ostream &operator<<(std::ostream &os, const dds::sub::Rank &r)
std::ostream &operator<<(std::ostream &os, const dds::sub::SampleInfo &si)
file ddssub.hpp
#include “dds/sub/detail/DataReaderImpl.hpp”#include “dds/sub/detail/QueryImpl.hpp”#include “dds/sub/detail/SampleImpl.hpp”#include “dds/sub/detail/SampleRefImpl.hpp”#include “dds/sub/cond/detail/QueryConditionImpl.hpp”
file AnyDataReaderImpl.hpp
#include <dds/sub/AnyDataReader.hpp>#include <dds/topic/TopicDescription.hpp>
file CoherentAccessImpl.hpp
#include <dds/sub/CoherentAccess.hpp>
file DataReaderImpl.hpp
#include <dds/sub/detail/DataReader.hpp>#include <dds/sub/Query.hpp>#include <dds/sub/detail/SamplesHolder.hpp>#include <dds/domain/DomainParticipantListener.hpp>#include “dds/core/macros.hpp”#include <dds/sub/AnyDataReader.hpp>#include <dds/sub/DataReaderListener.hpp>#include <dds/topic/Topic.hpp>#include <dds/topic/ContentFilteredTopic.hpp>#include <org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp>#include <org/eclipse/cyclonedds/core/ListenerDispatcher.hpp>
file GenerationCountImpl.hpp
#include <dds/sub/GenerationCount.hpp>
file GenerationCountImpl.hpp
file LoanedSamplesImpl.hpp
file Manipulators.hpp
#include <dds/sub/Query.hpp>
file QueryImpl.hpp
#include <dds/sub/Query.hpp>
file RankImpl.hpp
#include <dds/sub/Rank.hpp>
file RankImpl.hpp
file SampleImpl.hpp
#include <dds/sub/Sample.hpp>
file SampleInfoImpl.hpp
#include <dds/sub/SampleInfo.hpp>
file SampleInfoImpl.hpp
#include <org/eclipse/cyclonedds/core/config.hpp>#include <dds/sub/Rank.hpp>#include <dds/sub/GenerationCount.hpp>
file SampleRefImpl.hpp
#include <dds/sub/SampleRef.hpp>
file SamplesHolder.hpp
#include <dds/sub/LoanedSamples.hpp>#include “org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp”#include “org/eclipse/cyclonedds/topic/datatopic.hpp”
file SharedSamplesImpl.hpp
file SubscriberImpl.hpp
#include <dds/sub/Subscriber.hpp>
file GenerationCount.hpp
#include <dds/core/Value.hpp>
file GenerationCount.hpp
#include <dds/sub/detail/GenerationCountImpl.hpp>#include <org/eclipse/cyclonedds/sub/GenerationCountImpl.hpp>
file LoanedSamples.hpp
#include <dds/core/ref_traits.hpp>#include <dds/sub/SampleRef.hpp>#include <dds/sub/detail/LoanedSamples.hpp>#include <dds/sub/detail/LoanedSamplesImpl.hpp>
file LoanedSamples.hpp
file DataReaderQos.hpp
#include <dds/core/detail/EntityQosImpl.hpp>#include <org/eclipse/cyclonedds/sub/qos/DataReaderQosDelegate.hpp>
file SubscriberQos.hpp
#include <dds/core/detail/EntityQosImpl.hpp>#include <org/eclipse/cyclonedds/sub/qos/SubscriberQosDelegate.hpp>
file Query.hpp
#include <dds/core/types.hpp>#include <dds/core/Reference.hpp>#include <dds/sub/AnyDataReader.hpp>
file Query.hpp
#include <dds/sub/Query.hpp>#include <org/eclipse/cyclonedds/sub/QueryDelegate.hpp>
file Rank.hpp
#include <dds/core/Value.hpp>
file Rank.hpp
#include <dds/sub/detail/RankImpl.hpp>#include <org/eclipse/cyclonedds/sub/RankImpl.hpp>
file Sample.hpp
#include <dds/core/Value.hpp>#include <dds/sub/SampleInfo.hpp>
file Sample.hpp
#include <dds/sub/SampleInfo.hpp>
file SampleInfo.hpp
#include <dds/core/Time.hpp>#include <dds/core/Value.hpp>#include <dds/core/InstanceHandle.hpp>#include <dds/sub/GenerationCount.hpp>#include <dds/sub/Rank.hpp>#include <dds/sub/status/DataState.hpp>
file SampleInfo.hpp
#include <dds/sub/detail/SampleInfoImpl.hpp>#include <org/eclipse/cyclonedds/sub/SampleInfoImpl.hpp>
file SampleRef.hpp
#include <dds/core/Value.hpp>#include <dds/sub/SampleInfo.hpp>
file SampleRef.hpp
#include <dds/sub/SampleInfo.hpp>#include <org/eclipse/cyclonedds/topic/datatopic.hpp>
file SharedSamples.hpp
#include <dds/core/Reference.hpp>#include <dds/sub/Sample.hpp>#include <dds/sub/LoanedSamples.hpp>#include <dds/sub/detail/SharedSamples.hpp>#include <dds/sub/detail/SharedSamplesImpl.hpp>
file SharedSamples.hpp
#include <dds/sub/LoanedSamples.hpp>
file DataState.hpp
#include <bitset>#include <dds/core/types.hpp>
file DataStateImpl.hpp
#include <dds/sub/status/DataState.hpp>
file Subscriber.hpp
#include <dds/core/Entity.hpp>#include <dds/domain/DomainParticipant.hpp>#include <dds/sub/qos/DataReaderQos.hpp>
file Subscriber.hpp
#include <dds/sub/detail/SubscriberImpl.hpp>#include <org/eclipse/cyclonedds/sub/SubscriberDelegate.hpp>
file SubscriberListener.hpp
#include <dds/sub/AnyDataReaderListener.hpp>#include <dds/sub/Subscriber.hpp>
file AnyTopic.hpp
#include <dds/core/conformance.hpp>#include <dds/core/types.hpp>#include <dds/core/ref_traits.hpp>#include <dds/domain/DomainParticipant.hpp>#include <dds/topic/qos/TopicQos.hpp>#include <dds/topic/TopicDescription.hpp>
file AnyTopic.hpp
#include <dds/topic/detail/AnyTopicImpl.hpp>#include <org/eclipse/cyclonedds/topic/AnyTopicDelegate.hpp>
file AnyTopicListener.hpp
#include <dds/topic/AnyTopic.hpp>
file AnyTopicListener.hpp
#include <dds/topic/AnyTopicListener.hpp>
file BuiltinTopic.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/core/Value.hpp>#include <dds/core/policy/CorePolicy.hpp>#include <dds/topic/BuiltinTopicKey.hpp>
file BuiltinTopic.hpp
#include <dds/topic/Topic.hpp>#include <dds/topic/detail/TopicImpl.hpp>#include <dds/topic/detail/BuiltinTopicImpl.hpp>#include <org/eclipse/cyclonedds/topic/BuiltinTopicDelegate.hpp>#include <org/eclipse/cyclonedds/topic/BuiltinTopic.hpp>
file BuiltinTopic.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/core/Value.hpp>#include <dds/core/policy/CorePolicy.hpp>#include <dds/topic/BuiltinTopicKey.hpp>
file BuiltinTopicKey.hpp
#include <dds/core/Value.hpp>
file BuiltinTopicKey.hpp
#include <org/eclipse/cyclonedds/topic/BuiltinTopicKeyDelegate.hpp>#include <dds/topic/detail/BuiltinTopicKeyImpl.hpp>
file ContentFilteredTopic.hpp
#include <vector>#include <dds/core/detail/conformance.hpp>#include <dds/core/types.hpp>#include <dds/topic/Topic.hpp>#include <dds/topic/Filter.hpp>
file ContentFilteredTopic.hpp
#include <string>#include <vector>#include <dds/core/detail/conformance.hpp>#include <dds/core/types.hpp>#include <dds/topic/Topic.hpp>#include <dds/topic/Filter.hpp>#include <org/eclipse/cyclonedds/topic/TopicDescriptionDelegate.hpp>#include <org/eclipse/cyclonedds/core/ScopedLock.hpp>#include <org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp>
file ddstopic.hpp
#include <dds/topic/qos/TopicQos.hpp>#include <dds/topic/TopicDescription.hpp>#include <dds/topic/Topic.hpp>#include <dds/topic/AnyTopic.hpp>#include <dds/topic/ContentFilteredTopic.hpp>#include <dds/topic/discovery.hpp>#include <dds/topic/find.hpp>#include <dds/topic/detail/ddstopic.hpp>
file ddstopic.hpp
#include “dds/topic/detail/TopicDescriptionImpl.hpp”#include “dds/topic/detail/TopicImpl.hpp”#include “dds/topic/detail/TopicInstanceImpl.hpp”#include “dds/topic/detail/TContentFilteredTopicImpl.hpp”
file AnyTopicImpl.hpp
#include <dds/topic/AnyTopic.hpp>
file BuiltinTopicImpl.hpp
#include <dds/topic/BuiltinTopic.hpp>
file BuiltinTopicKeyImpl.hpp
#include <dds/topic/BuiltinTopicKey.hpp>
file ContentFilteredTopicImpl.hpp
#include <dds/topic/TContentFilteredTopic.hpp>
file FilterImpl.hpp
#include <dds/topic/Filter.hpp>
file TopicDescriptionImpl.hpp
#include <dds/topic/TopicDescription.hpp>
file TopicImpl.hpp
#include <dds/topic/Topic.hpp>#include “org/eclipse/cyclonedds/topic/TopicTraits.hpp”#include “org/eclipse/cyclonedds/topic/TopicListener.hpp”#include <dds/dds.h>#include <dds/topic/detail/Topic.hpp>#include <dds/topic/AnyTopic.hpp>#include <dds/topic/TopicListener.hpp>#include <org/eclipse/cyclonedds/core/ScopedLock.hpp>#include <org/eclipse/cyclonedds/core/ListenerDispatcher.hpp>#include “dds/ddsi/ddsi_sertype.h”

Defines

MAX_TOPIC_NAME_LEN
file TopicInstanceImpl.hpp
#include <dds/topic/TopicInstance.hpp>
file Filter.hpp
#include <dds/core/types.hpp>#include <dds/core/Value.hpp>
file Filter.hpp
#include <dds/topic/detail/FilterImpl.hpp>#include <org/eclipse/cyclonedds/topic/FilterDelegate.hpp>
file MultiTopic.hpp
#include <vector>#include <dds/core/detail/conformance.hpp>#include <dds/core/types.hpp>#include <dds/topic/TopicDescription.hpp>
file MultiTopic.hpp
#include <string>#include <vector>#include <dds/core/types.hpp>#include <dds/domain/DomainParticipant.hpp>#include <dds/topic/detail/TopicDescription.hpp>#include <dds/core/Query.hpp>
file TopicQos.hpp
#include <dds/core/detail/EntityQosImpl.hpp>#include <org/eclipse/cyclonedds/topic/qos/TopicQosDelegate.hpp>
file Topic.hpp
#include <dds/core/conformance.hpp>#include <dds/core/types.hpp>#include <dds/core/ref_traits.hpp>#include <dds/domain/DomainParticipant.hpp>#include <dds/topic/qos/TopicQos.hpp>#include <dds/topic/TopicDescription.hpp>#include <dds/topic/AnyTopic.hpp>
file Topic.hpp
#include <dds/core/ref_traits.hpp>#include <dds/topic/TopicTraits.hpp>#include <dds/core/status/Status.hpp>#include <dds/core/status/State.hpp>#include <dds/domain/DomainParticipant.hpp>#include <dds/topic/qos/TopicQos.hpp>#include <dds/topic/AnyTopic.hpp>#include <org/eclipse/cyclonedds/core/config.hpp>#include <org/eclipse/cyclonedds/topic/TopicTraits.hpp>#include <org/eclipse/cyclonedds/topic/AnyTopicDelegate.hpp>#include <org/eclipse/cyclonedds/topic/TopicDescriptionDelegate.hpp>#include <dds/dds.h>
file TopicDescription.hpp
#include <dds/core/Entity.hpp>#include <dds/topic/TopicTraits.hpp>#include <dds/domain/DomainParticipant.hpp>
file TopicDescription.hpp
#include <dds/topic/detail/TopicDescriptionImpl.hpp>#include <org/eclipse/cyclonedds/topic/TopicDescriptionDelegate.hpp>
file TopicInstance.hpp
#include <dds/core/Time.hpp>#include <dds/core/InstanceHandle.hpp>
file TopicListener.hpp
#include “dds/topic/Topic.hpp”
file TopicListener.hpp
#include “dds/topic/TopicListener.hpp”
file TopicTraits.hpp
#include <string>

Defines

REGISTER_TOPIC_TYPE(TOPIC_TYPE)
file TopicTraits.hpp
#include <vector>#include “org/eclipse/cyclonedds/topic/DataRepresentation.hpp”
file basic_cdr_ser.hpp
#include “cdr_stream.hpp”#include <org/eclipse/cyclonedds/core/type_helpers.hpp>#include <dds/core/Exception.hpp>#include <array>#include <vector>#include <string>#include <cstring>#include <algorithm>
file cdr_stream.hpp
#include “dds/ddsrt/endian.h”#include <org/eclipse/cyclonedds/core/type_helpers.hpp>#include <stdint.h>#include <stdexcept>#include <dds/core/macros.hpp>
file ConditionDelegate.hpp
#include <org/eclipse/cyclonedds/core/DDScObjectDelegate.hpp>#include <org/eclipse/cyclonedds/core/cond/FunctorHolder.hpp>#include <org/eclipse/cyclonedds/core/Mutex.hpp>#include <org/eclipse/cyclonedds/core/ScopedLock.hpp>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>#include <set>
file FunctorHolder.hpp
file GuardConditionDelegate.hpp
#include <org/eclipse/cyclonedds/core/cond/ConditionDelegate.hpp>
file ShadowParticipant.hpp
#include “dds/dds.h”#include <dds/domain/DomainParticipant.hpp>#include <org/eclipse/cyclonedds/core/config.hpp>#include <org/eclipse/cyclonedds/core/Mutex.hpp>#include <org/eclipse/cyclonedds/core/ScopedLock.hpp>
file StatusConditionDelegate.hpp
#include <dds/core/Entity.hpp>#include <dds/core/status/Status.hpp>#include <org/eclipse/cyclonedds/core/cond/ConditionDelegate.hpp>
file WaitSetDelegate.hpp
#include <vector>#include <map>#include <dds/core/Duration.hpp>#include <dds/core/cond/Condition.hpp>#include <org/eclipse/cyclonedds/core/config.hpp>#include <org/eclipse/cyclonedds/core/DDScObjectDelegate.hpp>
file config.hpp
#include <dds/core/macros.hpp>#include <dds/core/types.hpp>
file DDScObjectDelegate.hpp
#include “dds/core/macros.hpp”#include “dds/core/refmacros.hpp”#include “org/eclipse/cyclonedds/core/Mutex.hpp”#include “org/eclipse/cyclonedds/core/ObjectDelegate.hpp”#include <unordered_map>#include “dds/dds.h”
file EntityDelegate.hpp
#include <dds/core/status/State.hpp>#include <dds/core/InstanceHandle.hpp>#include <dds/core/policy/CorePolicy.hpp>#include <org/eclipse/cyclonedds/core/DDScObjectDelegate.hpp>#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>#include <org/eclipse/cyclonedds/core/status/StatusDelegate.hpp>
file EntityRegistry.hpp
#include <dds/core/detail/WeakReferenceImpl.hpp>#include <org/eclipse/cyclonedds/core/Mutex.hpp>#include <map>
file EntitySet.hpp
#include <dds/core/InstanceHandle.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>#include <org/eclipse/cyclonedds/core/Mutex.hpp>#include <org/eclipse/cyclonedds/core/WeakReferenceSet.hpp>#include <vector>#include <memory>#include <set>
file InstanceHandleDelegate.hpp
#include <dds/core/types.hpp>#include <org/eclipse/cyclonedds/core/config.hpp>#include <dds/dds.h>

Functions

inline std::ostream &operator<<(std::ostream &os, const org::eclipse::cyclonedds::core::InstanceHandleDelegate &h)
file ListenerDispatcher.hpp
#include “dds/dds.h”

Functions

void callback_on_inconsistent_topic(dds_entity_t topic, dds_inconsistent_topic_status_t status, void *arg)
void callback_on_offered_deadline_missed(dds_entity_t writer, dds_offered_deadline_missed_status_t status, void *arg)
void callback_on_offered_incompatible_qos(dds_entity_t writer, dds_offered_incompatible_qos_status_t status, void *arg)
void callback_on_liveliness_lost(dds_entity_t writer, dds_liveliness_lost_status_t status, void *arg)
void callback_on_publication_matched(dds_entity_t writer, dds_publication_matched_status_t status, void *arg)
void callback_on_requested_deadline_missed(dds_entity_t reader, dds_requested_deadline_missed_status_t status, void *arg)
void callback_on_requested_incompatible_qos(dds_entity_t reader, dds_requested_incompatible_qos_status_t status, void *arg)
void callback_on_sample_rejected(dds_entity_t reader, dds_sample_rejected_status_t status, void *arg)
void callback_on_liveliness_changed(dds_entity_t reader, dds_liveliness_changed_status_t status, void *arg)
void callback_on_data_available(dds_entity_t reader, void *arg)
void callback_on_subscription_matched(dds_entity_t reader, dds_subscription_matched_status_t status, void *arg)
void callback_on_sample_lost(dds_entity_t reader, dds_sample_lost_status_t status, void *arg)
void callback_on_data_readers(dds_entity_t subscriber, void *arg)
file MiscUtils.hpp
#include <dds/core/ddscore.hpp>#include <org/eclipse/cyclonedds/core/Mutex.hpp>#include “dds/dds.h”

Defines

STATUS_MASK_CONTAINS(mask, check)
file Missing.hpp
file Mutex.hpp
#include <dds/core/macros.hpp>
file ObjectDelegate.hpp
#include “dds/core/macros.hpp”#include “dds/core/refmacros.hpp”#include “org/eclipse/cyclonedds/core/Mutex.hpp”
file ObjectSet.hpp
#include <dds/core/InstanceHandle.hpp>#include <org/eclipse/cyclonedds/core/ObjectDelegate.hpp>#include <org/eclipse/cyclonedds/core/Mutex.hpp>#include <org/eclipse/cyclonedds/core/WeakReferenceSet.hpp>#include <vector>#include <memory>#include <set>
file Policy.hpp
#include <org/eclipse/cyclonedds/core/policy/ProprietaryPolicyKind.hpp>
file PolicyDelegate.hpp
#include <dds/core/types.hpp>#include <dds/core/LengthUnlimited.hpp>#include <dds/core/Duration.hpp>#include <dds/core/policy/PolicyKind.hpp>#include <org/eclipse/cyclonedds/core/policy/ProprietaryPolicyKind.hpp>#include <dds/dds.h>
file ProprietaryPolicyKind.hpp
#include <dds/core/SafeEnumeration.hpp>
file QosPolicyCountDelegate.hpp
#include <dds/core/types.hpp>
file QosProviderDelegate.hpp
#include <dds/domain/qos/DomainParticipantQos.hpp>#include <dds/topic/qos/TopicQos.hpp>#include <dds/sub/qos/SubscriberQos.hpp>#include <dds/sub/qos/DataReaderQos.hpp>#include <dds/pub/qos/PublisherQos.hpp>#include <dds/pub/qos/DataWriterQos.hpp>
file ReportUtils.hpp
#include <string>#include <sstream>#include <org/eclipse/cyclonedds/core/config.hpp>#include <dds/core/Exception.hpp>#include <dds/dds.h>#include <ios>#include <stdarg.h>

Defines

ISOCPP_ERROR
ISOCPP_UNSUPPORTED_ERROR
ISOCPP_INVALID_ARGUMENT_ERROR
ISOCPP_PRECONDITION_NOT_MET_ERROR
ISOCPP_OUT_OF_RESOURCES_ERROR
ISOCPP_NOT_ENABLED_ERROR
ISOCPP_IMMUTABLE_POLICY_ERROR
ISOCPP_INCONSISTENT_POLICY_ERROR
ISOCPP_ALREADY_CLOSED_ERROR
ISOCPP_TIMEOUT_ERROR
ISOCPP_NO_DATA_ERROR
ISOCPP_ILLEGAL_OPERATION_ERROR
ISOCPP_NULL_REFERENCE_ERROR
OS_PRETTY_FUNCTION
ISOCPP_DDSC_RESULT_CHECK_AND_THROW(code, ...)
ISOCPP_THROW_EXCEPTION(code, ...)
ISOCPP_BOOL_CHECK_AND_THROW(test, code, ...)
file ScopedLock.hpp
#include <org/eclipse/cyclonedds/core/Mutex.hpp>#include <org/eclipse/cyclonedds/core/ObjectDelegate.hpp>#include <cassert>
file StatusDelegate.hpp
#include <org/eclipse/cyclonedds/core/config.hpp>
file TimeHelper.hpp
#include <sstream>#include <dds/dds.h>#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>

Unfortunately, we need this because we can not change the Duration.hpp and Time.hpp and we don’t want this piece of code repeated in every function within their implementation files.

Defines

MS
MiS
NS
file type_helpers.hpp
#include <type_traits>
file WeakReferenceSet.hpp
#include <dds/core/macros.hpp>#include <memory>#include <set>
file Domain.hpp
#include “dds/core/types.hpp”
file DomainParticipantDelegate.hpp
#include <dds/core/ref_traits.hpp>#include <dds/core/Time.hpp>#include <dds/core/InstanceHandle.hpp>#include <dds/core/status/State.hpp>#include <dds/core/detail/WeakReferenceImpl.hpp>#include <dds/core/Entity.hpp>#include <dds/domain/qos/DomainParticipantQos.hpp>#include <dds/topic/qos/TopicQos.hpp>#include <dds/pub/qos/PublisherQos.hpp>#include <dds/sub/qos/SubscriberQos.hpp>#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>#include <org/eclipse/cyclonedds/core/Mutex.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>#include <org/eclipse/cyclonedds/core/ObjectSet.hpp>#include <org/eclipse/cyclonedds/core/EntitySet.hpp>#include <org/eclipse/cyclonedds/topic/DataRepresentation.hpp>#include “org/eclipse/cyclonedds/domain/Domain.hpp”#include “org/eclipse/cyclonedds/domain/DomainWrap.hpp”
file DomainParticipantRegistry.hpp
#include <org/eclipse/cyclonedds/core/EntityRegistry.hpp>#include <org/eclipse/cyclonedds/domain/DomainParticipantDelegate.hpp>#include <dds/domain/DomainParticipant.hpp>
file DomainWrap.hpp
#include <map>#include <dds/dds.h>#include <dds/core/ref_traits.hpp>
file DomainParticipantQosDelegate.hpp
#include <dds/core/policy/CorePolicy.hpp>
file ForwardDeclarations.hpp
file AnyDataWriterDelegate.hpp
#include <dds/core/types.hpp>#include <dds/core/Time.hpp>#include <dds/core/InstanceHandle.hpp>#include <dds/core/status/Status.hpp>#include <dds/pub/qos/DataWriterQos.hpp>#include <org/eclipse/cyclonedds/topic/TopicTraits.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>#include <dds/topic/TopicDescription.hpp>#include <dds/topic/BuiltinTopic.hpp>#include <org/eclipse/cyclonedds/topic/CDRBlob.hpp>
file CoherentSetDelegate.hpp
#include <dds/pub/Publisher.hpp>
file PublisherDelegate.hpp
#include <dds/core/types.hpp>#include <dds/core/Duration.hpp>#include <dds/core/status/State.hpp>#include <dds/pub/qos/PublisherQos.hpp>#include <dds/pub/qos/DataWriterQos.hpp>#include <dds/domain/DomainParticipant.hpp>#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>#include <org/eclipse/cyclonedds/core/EntitySet.hpp>#include <org/eclipse/cyclonedds/pub/AnyDataWriterDelegate.hpp>
file DataWriterQosDelegate.hpp
#include <dds/core/detail/conformance.hpp>#include <org/eclipse/cyclonedds/topic/qos/TopicQosDelegate.hpp>
file PublisherQosDelegate.hpp
#include <dds/core/policy/CorePolicy.hpp>
file SuspendedPublicationDelegate.hpp
#include <dds/pub/Publisher.hpp>
file AnyDataReaderDelegate.hpp
#include <dds/core/types.hpp>#include <dds/core/Time.hpp>#include <dds/core/InstanceHandle.hpp>#include <dds/core/status/Status.hpp>#include <dds/sub/status/detail/DataStateImpl.hpp>#include <dds/sub/qos/DataReaderQos.hpp>#include <dds/sub/Sample.hpp>#include <dds/sub/SampleInfo.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>#include <org/eclipse/cyclonedds/topic/TopicTraits.hpp>#include <org/eclipse/cyclonedds/core/ObjectSet.hpp>#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>#include <dds/topic/TopicDescription.hpp>#include <org/eclipse/cyclonedds/topic/CDRBlob.hpp>#include <dds/topic/BuiltinTopic.hpp>
file BuiltinSubscriberDelegate.hpp
#include <dds/core/types.hpp>#include <dds/domain/DomainParticipant.hpp>#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>#include <org/eclipse/cyclonedds/sub/SubscriberDelegate.hpp>#include <org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp>#include <org/eclipse/cyclonedds/core/Mutex.hpp>
file CoherentAccessDelegate.hpp
#include <dds/sub/Subscriber.hpp>
file QueryConditionDelegate.hpp
#include <org/eclipse/cyclonedds/sub/cond/ReadConditionDelegate.hpp>
file ReadConditionDelegate.hpp
#include <dds/sub/AnyDataReader.hpp>#include <org/eclipse/cyclonedds/core/cond/ConditionDelegate.hpp>#include <org/eclipse/cyclonedds/sub/QueryDelegate.hpp>
file DataReaderQosDelegate.hpp
#include <dds/core/detail/conformance.hpp>#include <org/eclipse/cyclonedds/topic/qos/TopicQosDelegate.hpp>
file SubscriberQosDelegate.hpp
#include <dds/core/policy/CorePolicy.hpp>
file QueryDelegate.hpp
#include <dds/core/macros.hpp>#include <dds/sub/Subscriber.hpp>#include <dds/sub/AnyDataReader.hpp>#include <org/eclipse/cyclonedds/core/DDScObjectDelegate.hpp>#include <org/eclipse/cyclonedds/core/Mutex.hpp>#include <vector>#include <iterator>
file SubscriberDelegate.hpp
#include <dds/core/types.hpp>#include <dds/core/status/State.hpp>#include <dds/sub/AnyDataReader.hpp>#include <dds/sub/qos/SubscriberQos.hpp>#include <dds/sub/qos/DataReaderQos.hpp>#include <dds/domain/DomainParticipant.hpp>#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>#include <org/eclipse/cyclonedds/core/EntitySet.hpp>#include <org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp>#include <vector>
file AnyTopicDelegate.hpp
#include <dds/core/types.hpp>#include <org/eclipse/cyclonedds/topic/TopicTraits.hpp>#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>#include <org/eclipse/cyclonedds/topic/TopicDescriptionDelegate.hpp>
file BuiltinTopicCopy.hpp
file BuiltinTopicDelegate.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/core/policy/CorePolicy.hpp>#include <dds/topic/BuiltinTopicKey.hpp>
file BuiltinTopicKeyDelegate.hpp
file BuiltinTopicTraits.hpp
#include <dds/topic/BuiltinTopic.hpp>#include <org/eclipse/cyclonedds/topic/TopicTraits.hpp>#include <org/eclipse/cyclonedds/topic/BuiltinTopicCopy.hpp>
file CDRBlob.hpp
#include <array>
file DataRepresentation.hpp
file datatopic.hpp
#include <memory>#include <string>#include <cstring>#include <vector>#include <atomic>#include “dds/ddsrt/endian.h”#include “dds/ddsrt/md5.h”#include “dds/ddsi/q_radmin.h”#include “dds/ddsi/q_xmsg.h”#include “dds/ddsi/ddsi_serdata.h”#include “org/eclipse/cyclonedds/core/cdr/basic_cdr_ser.hpp”#include “dds/ddsi/ddsi_keyhash.h”#include “org/eclipse/cyclonedds/topic/hash.hpp”#include “dds/features.hpp”

Functions

template<class streamer, typename T>
bool to_key(streamer &str, const T &tokey, ddsi_keyhash_t &hash)
static inline void *calc_offset(void *ptr, ptrdiff_t n)
static inline const void *calc_offset(const void *ptr, ptrdiff_t n)
template<typename T>
bool deserialize_sample_from_buffer(unsigned char *buffer, T &sample, const ddsi_serdata_kind data_kind = SDK_DATA)

De-serialize the buffer into the sample.

Parameters
  • buffer[in] The buffer to be de-serialized

  • sample[out] Type to which the buffer will be de-serialized

  • data_kind[in] The data kind (data, or key)

Template Parameters

T – The sample type

Returns

True if the deserialization is successful False if the deserialization failed

template<typename T>
bool serdata_eqkey(const ddsi_serdata *a, const ddsi_serdata *b)
template<typename T>
uint32_t serdata_size(const ddsi_serdata *dcmn)
template<typename T>
ddsi_serdata *serdata_from_ser(const ddsi_sertype *type, enum ddsi_serdata_kind kind, const struct nn_rdata *fragchain, size_t size)
template<typename T>
ddsi_serdata *serdata_from_ser_iov(const ddsi_sertype *type, enum ddsi_serdata_kind kind, ddsrt_msg_iovlen_t niov, const ddsrt_iovec_t *iov, size_t size)
template<typename T>
ddsi_serdata *serdata_from_keyhash(const ddsi_sertype *type, const struct ddsi_keyhash *keyhash)
template<typename T>
ddsi_serdata *serdata_from_sample(const ddsi_sertype *typecmn, enum ddsi_serdata_kind kind, const void *sample)
template<typename T>
void serdata_to_ser(const ddsi_serdata *dcmn, size_t off, size_t sz, void *buf)
template<typename T>
ddsi_serdata *serdata_to_ser_ref(const ddsi_serdata *dcmn, size_t off, size_t sz, ddsrt_iovec_t *ref)
template<typename T>
void serdata_to_ser_unref(ddsi_serdata *dcmn, const ddsrt_iovec_t *ref)
template<typename T>
bool serdata_to_sample(const ddsi_serdata *dcmn, void *sample, void **bufptr, void *buflim)
template<typename T>
ddsi_serdata *serdata_to_untyped(const ddsi_serdata *dcmn)
template<typename T>
bool serdata_untyped_to_sample(const ddsi_sertype *type, const ddsi_serdata *dcmn, void *sample, void **bufptr, void *buflim)
template<typename T>
void serdata_free(ddsi_serdata *dcmn)
template<typename T>
size_t serdata_print(const ddsi_sertype *tpcmn, const ddsi_serdata *dcmn, char *buf, size_t bufsize)
template<typename T>
void serdata_get_keyhash(const ddsi_serdata *d, struct ddsi_keyhash *buf, bool force_md5)
template<typename T>
void sertype_free(ddsi_sertype *tpcmn)
template<typename T>
void sertype_zero_samples(const ddsi_sertype*, void*, size_t)
template<typename T>
void sertype_realloc_samples(void **ptrs, const ddsi_sertype*, void*, size_t, size_t)
template<typename T>
void sertype_free_samples(const ddsi_sertype*, void **ptrs, size_t, dds_free_op_t op)
template<typename T>
bool sertype_equal(const ddsi_sertype *acmn, const ddsi_sertype *bcmn)
template<typename T>
uint32_t sertype_hash(const ddsi_sertype *tpcmn)
template<typename T>
size_t sertype_get_serialized_size(const ddsi_sertype*, const void *sample)
template<typename T>
bool sertype_serialize_into(const ddsi_sertype*, const void *sample, void *dst_buffer, size_t)

Variables

constexpr size_t CDR_HEADER_SIZE = 4U
file FilterDelegate.hpp
#include <string>#include <vector>#include <iterator>#include <dds/core/detail/inttypes.hpp>#include <dds/core/macros.hpp>
file hash.hpp
#include “dds/core/macros.hpp”#include “dds/ddsi/ddsi_keyhash.h”#include <vector>
file TopicQosDelegate.hpp
#include <dds/core/detail/conformance.hpp>#include <dds/core/policy/CorePolicy.hpp>
file TopicDescriptionDelegate.hpp
#include <dds/domain/DomainParticipant.hpp>#include <org/eclipse/cyclonedds/core/ObjectDelegate.hpp>
group isocpp2_dcps
group isocpp2_dcps_domain
group isocpp2_dcps_topic
group isocpp2_dcps_pub
group isocpp2_dcps_sub
group isocpp2_dcps_core
group examplesdcpsisocpp
dir org/eclipse/cyclonedds/core/cdr
dir dds/core/cond
dir org/eclipse/cyclonedds/core/cond
dir org/eclipse/cyclonedds/sub/cond
dir dds/sub/cond
dir org/eclipse/cyclonedds/core
dir dds/core
dir org/eclipse/cyclonedds
dir dds
dir dds/sub/status/detail
dir dds/sub/detail
dir dds/core/status/detail
dir dds/topic/detail
dir dds/core/cond/detail
dir dds/core/xtypes/detail
dir dds/core/detail
dir dds/domain/detail
dir dds/core/policy/detail
dir dds/sub/cond/detail
dir dds/pub/detail
dir org/eclipse/cyclonedds/domain
dir dds/domain
dir org/eclipse
dir org
dir org/eclipse/cyclonedds/core/policy
dir dds/core/policy
dir org/eclipse/cyclonedds/pub
dir dds/pub
dir org/eclipse/cyclonedds/sub/qos
dir dds/topic/qos
dir org/eclipse/cyclonedds/topic/qos
dir org/eclipse/cyclonedds/domain/qos
dir dds/pub/qos
dir dds/sub/qos
dir dds/domain/qos
dir org/eclipse/cyclonedds/pub/qos
dir dds/core/status
dir dds/sub/status
dir org/eclipse/cyclonedds/core/status
dir org/eclipse/cyclonedds/sub
dir dds/sub
dir org/eclipse/cyclonedds/topic
dir dds/topic
dir dds/core/xtypes